functions – If URL x, load template, else single.php
Question
I have custom posts that I want to be shown in a different template.
Right now I have this:
All other default posts are on:
www.mywebsite.com/post aka www.mywebsite.com/%postname%/
Basically, I’m trying to find a function.php code, that identifies URL and applies another template.
So, if path www.mywebsite.com/travel/post, then load traveltemplate.php
else, single.php
Any help would be appreciated.
0
2 years
2021-04-06T05:53:32-05:00
2021-04-06T05:53:32-05:00 0 Answers
0 views
0
Leave an answer