[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
Wed Aug 10 14:41:25 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 |
--------------------------+------------------------------
Changes (by husobj):
* cc: ben@… (added)
Comment:
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:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list