WordPress.org

Support

Support » Themes and Templates » [Resolved] Custom Theme Problem

[Resolved] Custom Theme Problem

  • DarkGashX
    Member

    @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 15 replies - 1 through 15 (of 22 total)
  • DarkGashX
    Member

    @darkgashx

    I forgot to add, the code I am using for the navigation bar is:

    <li class="<?php if (is_home()) { ?>current_page_item<?php } else { ?>page_item<?php } ?>">
    /">
    <?php _e('Home',TEMPLATE_DOMAIN); ?>

    <?php wp_list_pages('sort_column=menu_order&depth=1&title_li='); ?>

    and on the sidebar for the categories:

    <?php wp_list_categories('sort_column=name&show_count=1&title_li=&hierarchical=1&feed=RSS&feed_image='.get_bloginfo('stylesheet_directory').'/images/icons/feed-iconsmall.gif'); ?>

    Hope that helps someone to help me.. if that makes sense (lol).

    I have the same problem =(
    somebody has the answer? please! 🙂

    P.D. In this topic also they have the same problem
    http://wordpress.org/support/topic/104401?replies=1

    Even in theme ‘default’ if I add this at the end of the file style.css

    #sidebar ul li.current-cat a {color:#FF0000;}
    #sidebar .pagenav ul li.current_page_item a {color:#FF0000;}

    If the ID page is the same ID of the category is highlighted both

    DarkGashX
    Member

    @darkgashx

    I guess it’s a WP bug as no one has any answers mate.

    DarkGashX
    Member

    @darkgashx

    Can any WP coder or staff confirm this bug?

    DarkGashX
    Member

    @darkgashx

    Infected-FX any luck? This is bugging me now :(.

    This is not a WP *bug* as if there ever were such a thing. It is theme dependent. Do I know the answer? Sorry. No I don’t.

    DarkGashX
    Member

    @darkgashx

    Oh, just kind of strange as it only happens with categories and if they have the same ID as a page.

    It’s always been a bad idea to name cats same as pages or vice versa. Can break all sorts of things, as you seem to have discovered.

    DarkGashX
    Member

    @darkgashx

    No no, the same ID (i.e. 1, 2, 3 etc). You can’t change that.

    I did check the WP code that gets executed when using wp_list_categories and is not causing any issue with wp_list_pages.
    are you using wp_list_categories ?

    DarkGashX
    Member

    @darkgashx

    Yes I am, here is my code:

    <?php wp_list_categories(‘sort_column=name&show_count=1&title_li=&hierarchical=1&feed=RSS&feed_image=’.get_bloginfo(‘stylesheet_directory’).’/images/icons/feed-icon-10×10.gif’); ?>

    This is really really strange and I dont know what causes the wp_list_pages to emit “class=current_page_item” while it is not the current page really.

    This suggestion might sound stupid, but try it anyway.
    change your ul class=”menu” to ul id=”menu” and change your stylesheet to have #menu instead of .menu

    also move the #menu styles to be above #sidebar styles.

    see it if it helps.

    DarkGashX
    Member

    @darkgashx

    No luck for me, so I reverted it back. This is real weird, I don’t understand it :s. Does the WP team post on here?

    Meaning the devs? No. You might want to hit http://lists.automattic.com/, and check out/sign up for the hackers list.

    DarkGashX
    Member

    @darkgashx

    Oh, well I’m not sure on what to do. You can see what I mean here: http://www.darkgashx.com . Click Television Shows on the right and you will see a nav option at the top gets highlighted.

Viewing 15 replies - 1 through 15 (of 22 total)
  • The topic ‘[Resolved] Custom Theme Problem’ is closed to new replies.