[wp-trac] [WordPress Trac] #21676: Pass a variable to get_template_part()

WordPress Trac noreply at wordpress.org
Fri Sep 16 15:55:45 UTC 2016


#21676: Pass a variable to get_template_part()
-----------------------------+-------------------------
 Reporter:  sc0ttkclark      |       Owner:
     Type:  enhancement      |      Status:  closed
 Priority:  normal           |   Milestone:
Component:  Template         |     Version:  3.4.1
 Severity:  normal           |  Resolution:  maybelater
 Keywords:  has-patch close  |     Focuses:
-----------------------------+-------------------------

Comment (by shamai):

 I have been using:
 {{{
 include( locate_template( 'template-parts/content.php' ) );

 }}}

 I think it works well…

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


More information about the wp-trac mailing list