HostOnNet Blog

Different template for specific categories in wordpress

Looking for Linux Server Admin or WordPress Expert? We can help.

Created different template for Webdesign Portfolio page at http://blog.hostonnet.com/category/webdesign-portfolio.

By creating templates for categories you can add specific features on category pages. For example, you can allow users to subscribe to categories, add category images, show category description and choose a different layout for each category.

WordPress has a template hierarchy that is used to find which template file to use.Now lets assume that you have a category called ‘webbesign’ with the category-slug ‘webbesign’ and you want to display this category differently than others. To do that, you need to create a template for that particular category.

Download category.php from wp-content/themes/YOURTHEME, then copy all the contents of category.php and paste them in a text editor like Notepad. Save this file as category-webbesign.php and upload the file to your theme directory.

Now any changes you make to this template will only appear in this particular category’s archive page.

More details at http://codex.wordpress.org/Category_Templates

We can do the same by using the Custom Category Template plugin
https://wordpress.org/plugins/custom-category-template/

About Sibi Antony

Bootstrap and Android LOVER. I've been creating things for the web for over 10 years, from the period of flash and table based layout web sites till mobile and tab friendly web sites.
Posted in Wordpress

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.