[wp-trac] [WordPress Trac] #13239: Filter locate_template template_names variable

WordPress Trac noreply at wordpress.org
Fri Jul 28 23:18:51 UTC 2017


#13239: Filter locate_template template_names variable
-------------------------+-----------------------------
 Reporter:  chrisjean    |       Owner:
     Type:  enhancement  |      Status:  reopened
 Priority:  normal       |   Milestone:  Future Release
Component:  Themes       |     Version:  3.0
 Severity:  normal       |  Resolution:
 Keywords:  has-patch    |     Focuses:
-------------------------+-----------------------------

Comment (by dnavarrojr):

 Wow... 7 years and still not resolved.  I'm at a total loss.

 My question is, what is the correct method for adding a template part from
 a plugin that creates a custom post type?

 For example, I create a CPT called "tacos" and I want to control the
 content area of my CPT using a template in my plugin folder.  I don't want
 to put it in the theme folder because what happens when the user changes
 themes, but keep using my plugin?

 I would think just adding a filter to add my template folder into the
 hierarchy would be a simple thing, but apparently not...

--
Ticket URL: <https://core.trac.wordpress.org/ticket/13239#comment:117>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list