Writting plugin that needs to create pages on the fly from slug
-
I can override what ever template is set by my_template as long as it is not a 404 condition:
add_filter( ‘template_include’, ‘my_template’ );
It does not work in a 404 condition. What I want to do is when a certain condition exists, stop the 404 condition and use the template I want to use.
Have tried setting the condition to false, but it failed. Installed a plug in that tells me what template files are using. It tells me it is using my_template but it is not.
Any clues?
- The topic ‘Writting plugin that needs to create pages on the fly from slug’ is closed to new replies.