Custom Post Type Plugin: Where Do I Put The Template?

Posted by Prem Tiwari | Updated on

You can use the single_template filter to switch out the template. In your callback, see if the theme provided a template for the post type, if it did, do nothing.

Alternatively, you can use a callback with the_content filter, and just change stuff in the content itself.


If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.

Related Questions & Answers