テーマに含まれるphpを全部整理する

WordPressのテーマのファイル構成一覧と解説(2.7対応版)も参考にしつつ、今回のテーマの整理を進める。

index.phpを中心に読み込みも見て行く

  • index.php
    • header.phpを読み込み
      • meta関連
      • #header
      • div class="wpn_content"開始まで
    • 記事リスト表示部分(Left)読み込みじゃないのはココと404だけ
      • Featured Post
      • twitter
      • recent comments
      • News List (記事羅列)
      • Page Navi
    • 404
    • sidebar.phpを読み込み(Right)
    • footer.phpを読み込み
      • Bottom : about,meta,blogrollが入ってる部分。消してしまえ。
      • wrapperが終わる
      • footerが始まる。コピーライトとかがある部分。
      • /body,/html : footer.phpの中でhtmlも終わる。

あまったphpたち

どこかで使われているのでしょう。見逃してるかif/else/while関係部分で読み込まれるはず。

  • archive.php
  • comments.php
  • page.php
  • search.php
  • single.php
  • template_linksbookmarks.php
  • template_nosidebar.php

怪しいphp

これは何か意味がありそう。