Forums

[resolved] Nav Menu Buttons (5 posts)

  1. daleberg
    Member
    Posted 1 year ago #

    having some issues with a navigation menu. have 7 pages defined in WP and would like a nav button for each page, but am limited (somewhere in the code to only having 5 nav buttons. found the snippet below in the header.php file which i thought was the limiting culprit, but when i change the number=6 to 8 or 10, i still don't get any additional nav buttons. i searched though the .css files as well and did not see anything remotely related to nav, only formatting (colors/font/size) type of variables. am i looking in the right place? can you point me in the write direction?

    <ul id="nav">
    <li <?php if(is_home()) {?>class="current_page_item" <?php } ?>>/">Home
    <?php wp_list_pages('depth=1&number=6&sort_column=menu_order&title_li=' ); ?>

  2. alchymyth
    The Sweeper
    Posted 1 year ago #

    you have changed probably the right piece of code;
    did you check the html code in the browser, if the code outputs more than 5 buttons?
    maybe the width of your menu is limited?

    without a link to your site there is nothing more to say.

  3. daleberg
    Member
    Posted 1 year ago #

    thanks for the reply

    site is http://www.wwwcccl.com

  4. alchymyth
    The Sweeper
    Posted 1 year ago #

    this is the line in header.php:
    <?php wp_list_pages('depth=1&number=6&sort_column=menu_order&title_li=' ); ?>
    depth=1: only top level pages (parent pages);
    number=6: max 6 pages;

    i downloaded and installed the theme in my local test installation,
    (edit: wp2.92) and i can confirm that for some reason, unexplainable to me, this number parameter does not work;
    if you totally remove it, however, it will show all your top level pages.

    with your 7 pages, this should be ok:

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

  5. daleberg
    Member
    Posted 1 year ago #

    thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags