[wp-trac] [WordPress Trac] #6664: Add CSS class 'current_page_parent' for posts when static posts page set

WordPress Trac wp-trac at lists.automattic.com
Thu Apr 10 17:22:48 GMT 2008


#6664: Add CSS class 'current_page_parent' for posts when static posts page set
------------------------+---------------------------------------------------
 Reporter:  joshgerdes  |       Owner:  anonymous       
     Type:  defect      |      Status:  new             
 Priority:  normal      |   Milestone:                  
Component:  General     |     Version:  2.5             
 Severity:  normal      |    Keywords:  has-patch tested
------------------------+---------------------------------------------------
 The problem arises when you have set a specific page as the ‘posts page’
 for the site. When you are on a post the expected result would be for the
 ‘current_page_parent’ class to be set in the menu for the page you
 specified as the ‘posts page’ in for the site. This is not the result you
 get with the release 2.5 version of Wordpress. After a little digging I
 found the following fixes the issue:

 Add these lines to wp-includes/classes.php after line 562:

 {{{
     elseif ($page->ID == get_settings(’page_for_posts’))
          $css_class .= ‘ current_page_parent’;
 }}}

 I have attached a patch for this bug.  It has been tested again SVN
 revision 7638.

-- 
Ticket URL: <http://trac.wordpress.org/ticket/6664>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list