Monday, August 27, 2012

WordPress Template Hierarchy – Importance of WordPress Template Hierarchies

English: A screenshot of the WordPress admin i...

English: A screenshot of the WordPress admin interface. (Photo credit: Wikipedia)



Supposing you are implementing the following complex changes “together” like:



  1. Displaying excerpts with thumbnails only on tag pages while serving normal content on date archives and categories (not using excerpt or thumbnail).

  2. Embedding lengthy jQuery slide shows to category pages only but not present on tags or other archive pages.

  3. Displaying different ad networks on categories, tags but no ads on archives.

  4. Displaying unique widgets on each sidebar of these different templates.


All of these changes can be made simpler if you understand template hierarchies in WordPress and directly implementing the changes to the canonical template.


In this case, you have isolated each template completely that makes it easier to implement complex changes specific only to that template. You also save some resources by not relying too much on PHP in serving the content.


The above example is not only limited on archives (tags, categories, etc) but can be implemented in customizing your entire WordPress theme. The key is to identify the canonical template in the hierarchy and make sure you use them in making big changes in your theme.


This is a part of WordPress Template Hierarchy tutorial.



The post WordPress Template Hierarchy – Importance of WordPress Template Hierarchies appeared first on Tutorial Mini.


Related posts:



  1. WordPress Template Hierarchy

  2. WordPress Template Hierarchy – Template hierarchy in details

  3. WordPress Template Hierarchy – Practical Application






via Tutorial Mini http://tutorialmini.com/wordpress-template-hierarchy-importance-of-wordpress-template-hierarchies/

No comments:

Post a Comment