[wp-trac] [WordPress Trac] #16264: Add function get_pages_by_template()

WordPress Trac noreply at wordpress.org
Sat Feb 14 12:29:07 UTC 2015


#16264: Add function get_pages_by_template()
-------------------------------+------------------------------
 Reporter:  mikeschinkel       |       Owner:
     Type:  feature request    |      Status:  new
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  Posts, Post Types  |     Version:  3.1
 Severity:  normal             |  Resolution:
 Keywords:  needs-refresh      |     Focuses:
-------------------------------+------------------------------

Comment (by F J Kaiser):

 I'd at least vote to return the full `\WP_Query` object and not just the
 `$result->posts` property. Having access to the WP loop with `if (
 have_posts() )` is a bonus and it's usage should be encouraged.

 The filter itself imho is useless. There's pretty much no chance to really
 pinpoint a specific call in its current state. Every callback would affect
 any call to the function everywhere.

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


More information about the wp-trac mailing list