[wp-trac] [WordPress Trac] #21596: enhance wp_get_archives to support post types

WordPress Trac noreply at wordpress.org
Tue May 7 19:05:42 UTC 2013


#21596: enhance wp_get_archives to support post types
-------------------------+------------------------------
 Reporter:  jjminkle     |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  General      |     Version:
 Severity:  normal       |  Resolution:
 Keywords:  has-patch    |
-------------------------+------------------------------

Comment (by SergeyBiryukov):

 Replying to [comment:4 ancawonka]:
 > In the meantime, you can achieve the same effect by adding a posts_where
 filter before you do your wp_get_archives call, and then removing it right
 after.

 `wp_get_archives()` doesn't call `WP_Query::get_posts()`, so the
 `posts_where` filter doesn't seem applicable here.

 There is, however, `getarchives_where` filter that can be used instead:
 [[BR]]
 http://core.trac.wordpress.org/browser/tags/3.5.1/wp-includes/general-
 template.php#L915

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/21596#comment:5>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list