Forums

[resolved] Weird Menu Item (10 posts)

  1. boldlygo
    Member
    Posted 3 years ago #

    I've recently redone my layout, and now for some reason there is an "All" option in my menu. It's driving me nuts. I can't find it anywhere in the code to get rid of it.

    Website: boldlygo.org

    Code:

    <div id="header">
    
    <div id="categorylist">
    <ul>
    <li<?php if(!is_page() ) { ?> class="current_page_item"<?php } ?>><a href="<?php bloginfo('home'); ?>">Home</a></a></li>
    <?php wp_list_pages('sort_column=menu_order&depth=1&title_li='); ?>
    
    <li<?php if(!is_category() ) { ?> class=""<?php } ?>></li>
    <?php list_cats(); ?>
    </ul>

    Thanks!

  2. esmi
    Theme Diva & Forum Moderator
    Posted 3 years ago #

    Have you created a WP page with the title "All"? If so, try setting it to draft.

  3. boldlygo
    Member
    Posted 3 years ago #

    Have you created a WP page with the title "All"? If so, try setting it to draft.

    Nope.

  4. esmi
    Theme Diva & Forum Moderator
    Posted 3 years ago #

    What's this line supposed to do?

    <li<?php if(!is_category() ) { ?> class=""<?php } ?>></li>

    Try removing it.

  5. boldlygo
    Member
    Posted 3 years ago #

    When I go into pages I've created three pages. The "About" page and two pages I've set to private: "Archives" and "Thank You". I can find the "Home" page in the code, and the other menu options are categories.

    I don't know where "All" is coming from...

  6. boldlygo
    Member
    Posted 3 years ago #

    What's this line supposed to do?

    <li<?php if(!is_category() ) { ?> class=""<?php } ?>>

    Try removing it.

    That line did nothing apparently :). It's gone now, no change.

  7. esmi
    Theme Diva & Forum Moderator
    Posted 3 years ago #

    Perhaps it's coming from elsewhere in header.php or whatever file is generating the top nav bar. Can you drop a copy of the full relevant file into the Pastebin?

  8. boldlygo
    Member
    Posted 3 years ago #

  9. esmi
    Theme Diva & Forum Moderator
    Posted 3 years ago #

    Doh! It was staring me in the face! The list_cats() tag is outdated and needs to be replaced by wp_list_categories().

  10. boldlygo
    Member
    Posted 3 years ago #

    Thanks! Lol. That worked. I never would have gotten that.

Topic Closed

This topic has been closed to new replies.

About this Topic