html

Posted by & filed under Themes.

If you build a then it might not be a bad idea to use get_template_part() to avoid extra code (and testing, debugging etc).
The most logical place would be in the ,archive and individual pages.

This allows you to have one template that contains and individual post.

Better information can be found here and in the codex.

The most relevant  information:

will do a PHP require() for the first file that exists among these, in this priority:

  1. wp-content/themes//loop-index.
  2. wp-content/themes/twentytenchild/loop.php
  3. wp-content/themes/twentyten/loop-index.php
  4. wp-content/themes/twentyten/loop.php

This means that you can decide in your pages to use templates for  loop-index, loop-archive etc but not design them yet. creators of child  theme can create a a loop-index etc.. without the need to modify the original index template.

In the TwentyEleven Theme it is done with the following code, so that for each type of post a special content template can be used (but is not required):




zv7qrnb