[wp-trac] [WordPress Trac] #17590: wp_list_pages() not setting "current_page_item" classes on custom post types
WordPress Trac
wp-trac at lists.automattic.com
Mon Aug 15 15:44:21 UTC 2011
#17590: wp_list_pages() not setting "current_page_item" classes on custom post
types
--------------------------+------------------------------
Reporter: tobiasn | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Themes | Version: 3.1
Severity: normal | Resolution:
Keywords: has-patch |
--------------------------+------------------------------
Comment (by tobiasn):
Nice quickfix, however i would prefer pinpointing custom post types.
Replying to [comment:1 husobj]:
> As a temporary measure you can hook into to add selected classes like
this:
>
> {{{
> function my_page_css_class( $css_class, $page ) {
> global $post;
> if ( $post->ID == $page->ID ) {
> $css_class[] = 'current_page_item';
> }
> return $css_class;
> }
> add_filter( 'page_css_class', 'my_page_css_class', 10, 2 );
> }}}
--
Ticket URL: <http://core.trac.wordpress.org/ticket/17590#comment:3>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list