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

WordPress Trac noreply at wordpress.org
Thu Jul 14 20:04:30 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 eddiemoya):

 How is this not a thing yet? There are limitless reasons to lead a
 template that have nothing to do with the global scope. The very simplest
 being a template that needs to load another template, based on a variable.

 So here I go writing the same custom workaround into my functions.php file
 that everyone has.

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


More information about the wp-trac mailing list