• Resolved darkgashx

    (@darkgashx)


    I have a custom theme at my website and it’s all great but for some reason if I click the category “Television Shows” or “Video Games” on the right it highlights “Gamercard Generator” and “About Me” at the top as if we/you are viewing that page… but we/you are not!

    I’m really stumped and I would like some help if possible :).

    My Site: http://www.darkgashx.com .

Viewing 7 replies - 16 through 22 (of 22 total)
  • Thread Starter darkgashx

    (@darkgashx)

    Ok It is because of the categories and their ID’s. For instance:

    If you have a category with ID 2 and a page with ID 2 it highlights the page in the navigation bar with id 2 when selecting the category with ID 2. Seems there is some kind of conflict?

    It is a WordPress bug without a doubt.

    How do I submit this as a bug?

    http://trac.ww.wp.xz.cn/

    Include details on how to reproduce it!

    Thread Starter darkgashx

    (@darkgashx)

    Done, thanks.

    Moderator Samuel Wood (Otto)

    (@otto42)

    ww.wp.xz.cn Admin

    This might be worth a try:

    In wp-includes/classes.php, right around line 509, you’ll find this code:

    $css_class = 'page_item';
    $_current_page = get_page( $current_page );
    if ( $page->ID == $current_page )
    	$css_class .= ' current_page_item';
    elseif ( $_current_page && $page->ID == $_current_page->post_parent )

    Try changing it to this:

    $css_class = 'page_item';
    $_current_page = get_page( $current_page );
    if ( $page->ID == $_current_page->ID )
    	$css_class .= ' current_page_item';
    elseif ( $_current_page && $page->ID == $_current_page->post_parent )

    The difference is subtle. 🙂

    OLD: if ( $page->ID == $current_page )
    NEW: if ( $page->ID == $_current_page->ID )

    See? 😀

    Thread Starter darkgashx

    (@darkgashx)

    My site has gone down I will try it later. Thabks.

    Thread Starter darkgashx

    (@darkgashx)

    Sorry, didn’t work :(.

    Thread Starter darkgashx

    (@darkgashx)

    WOO! 2.1.1 fixes it, I reported it only a few days ago and they fixed it! Thanks WP Team! :).

Viewing 7 replies - 16 through 22 (of 22 total)

The topic ‘Custom Theme Problem’ is closed to new replies.