I am using a wordpress template. I have many categories, like, Adventure, Sports, News. Now, each category have posts in it, I know singlep.php
is generating the all kind of posts. Suppose, if you click on News, it will show all the posts related to News. Every posts is identified as same page type "Post". But, I want to call a separate Post php file instead of single.php, when Adventure is clicked. Means, when I am browsing the posts of Adventure category, then it should come from example.php
. Example.php is the file that I want to link with Adventure. I need help regarding that. It will be like,
if (Category == Adventure)
call the example.php
else
single.php
Where should I focus to do this. Is there anything related to functions.php
? Also, how wordpress calls the Single.php
? So that I can instruct it to call my example.php
too.