I designed a file as category-videos.php, since i have read that either use category-[slug].php or category-[ID].php . But, i'm not sure the following steps. How you can link it with wordpress ? How you can link all posts with this particular template ?
Mainly my requirement is the fact that I wish to produce a new template for my specific category "VIDEOS" to ensure that all posts under this category show in new style. Essentially, i wish to show posts with videos in a different way as 3 posts in a single row with featured images along with a featured slider in addition page showing 4 new posts of this category ?
However i am confused... Can one do that in wordpress ? Because home page also offers a featured slider. Can one produce a new slider for your page template only one factor is certain. I have to use just one category for your custom template i.e. videos.........
Any assistance will be appreciated. Thanks ahead of time ....
Create category-Id.php file (for instance category-1.php). You are able to found Id number when hover on category in admin. That you can do with this particular category give me an idea.
For instance, during my blog i've with thumbnail and without.
One other way via Is_category tag
<?php if (is_category('1')) : ?> Code For Category One <?php else : ?> Code for other categories <?php endif; ?>
My custom template works all right with the addition of slug or id ( category-slug.php ).. Wordpress will instantly find the correct template according web site hierarchy. If you want the kid from the category make use of the parent template too, use add_action('template_redirect','your_function').