define('DISALLOW_FILE_EDIT', true);
Comments on: Including Page Templates from a WordPress Plugin
http://www.unfocus.com/2010/08/10/including-page-templates-from-a-wordpress-plugin/
Home of Scripts 'n Styles for WordPress, Backstage2D and History Keeper!Wed, 12 Mar 2014 06:49:03 +0000
hourly
1 https://wordpress.org/?v=6.2.5
By: seema
http://www.unfocus.com/2010/08/10/including-page-templates-from-a-wordpress-plugin/comment-page-1/#comment-70689
Wed, 12 Mar 2014 06:49:03 +0000http://www.unfocus.com/?p=481#comment-70689Custom taxonomy page is not working .Getting 404 page not found error. and I have taxonomy-courses.php page in theme folder. but it doesn’t redirect.
taxonomy_template filter is also not working.
Please give me some solution.
Hi Jon, I didn’t see any obvious mistakes, but the gist doesn’t include the add_filter calls or your version of locate_plugin_template. I can say that my tutorial code is over 2 years old now (I’m sure you noticed that the function links are outdated at least). Core may have changed how it handles things since then. A quick look though, I see a new function `get_query_template` and some new filters there. There’s probably an opportunity for simplifying down what we are trying to do there.
I originally intended this tutorial to be more about how to read through core’s code, and write filters against what you find. I didn’t really intend for anyone to use this particular code, so I haven’t kept it updated. Sorry I couldn’t be more help.. I’ll see about writing an updated version of this tutorial.
]]>
By: Jon
http://www.unfocus.com/2010/08/10/including-page-templates-from-a-wordpress-plugin/comment-page-1/#comment-40566
Wed, 05 Sep 2012 23:56:16 +0000http://www.unfocus.com/?p=481#comment-40566Kenneth,
Thanks for this. I’m trying to adapt it to add custom page templates for archive-cpt.php and page-cpt.php which are located in the templates folder of my plugin. I don’t think the modifications I made based on your examples are quite working. I’ve put my modifications to the core functions from http://core.trac.wordpress.org/browser/tags/3.4.1/wp-includes/template.php#L0 in a gist at https://gist.github.com/3648028 Maybe you can find the obvious mistake I’m making.
]]>
By: Rohit sharma
http://www.unfocus.com/2010/08/10/including-page-templates-from-a-wordpress-plugin/comment-page-1/#comment-7317
Mon, 30 May 2011 06:13:58 +0000http://www.unfocus.com/?p=481#comment-7317Hello
Can you tell me exact way to include page template into a word press plugin.
Thanks
Rohit sharma
]]>
By: Kenneth Newman
http://www.unfocus.com/2010/08/10/including-page-templates-from-a-wordpress-plugin/comment-page-1/#comment-5771
Tue, 22 Mar 2011 18:03:09 +0000http://www.unfocus.com/?p=481#comment-5771My code was intended for inclusion in a plugin, but I don’t intend anyone use my code directly… I’d have to be adjusted significantly to do whatever you need. I meant it only as an example of where to look for such info (each function has a reference link to the WordPress source code) primarily for intermediate plugin developers.
Prof.S.Balachandran: If you have access to the theme (as a theme dev or blog owner) you need not modify anything in the manner that I am. This probably isn’t very good code for what you’re attempting 🙂
]]>
By: Prof.S.Balachandran
http://www.unfocus.com/2010/08/10/including-page-templates-from-a-wordpress-plugin/comment-page-1/#comment-5653
Tue, 15 Mar 2011 14:54:59 +0000http://www.unfocus.com/?p=481#comment-5653Interesting. I am trying to customise the “subscriptions manager” page of “subscribe-to-comments” plugin to my website’s theme. Will this be helpful? Wasn’t sure where to add this code:
To the functions.php of theme?
Or, create a separate file in the plugin directory? Shall be thankful for answer.
]]>