The tag has no usage guidance.

learn more… | top users | synonyms

8
votes
2answers
4k views

Use template_include with custom post types

I want to check for an appropriate template in the theme folder before falling back to the file in my plugin directory. Here’s my code: add_filter('template_include', 'sermon_template_include'); ...
1
vote
3answers
133 views

Get template name by full URL

Is There Any Way to get the template Name By full URL for example If the full url is www.example.com/hello-world I need a function that return the template name (page.php) I know that WordPress ...
14
votes
3answers
5k views

Is there any way to use get_template_part() with folders?

I'm wondering if there is any way to use get_template_part() with folders? My main folder has a lot of files now because I put every re-usable element in a separate file. I'd like to put them in ...
0
votes
1answer
70 views

Template Include crashing browser

I am creating a plugin which requires use of custom templates so using the following code to use the templates: add_filter('template_include', 'hhavideo_set_template'); function ...