• Resolved goldmember

    (@goldmember)


    i’m using the basis twentyten theme here: https://bandit4x4.com/wordpress/

    in the header.php file, the wp_nav_menu code is creating the top nav bar.

    <div id="access" role="navigation">
    
    				<?php wp_nav_menu( array( 'container_class' => 'menu-header', 'theme_location' => 'primary' ) ); ?>
    			</div><!-- #access -->

    but i need it to exclude the Disclaimer Page, which is the second link in the top nav bar. how do i do that?

    please advise. thanks.

Viewing 9 replies - 1 through 9 (of 9 total)
  • Themes that use the wp_nav_menu function properly, such as Twenty Ten, generally do not have use of the exclude parameter associated with other menu creating functions such as wp_list_pages or wp_page_menu.

    Have you tried creating a custom menu to match your existing one and simply not use “Disclaimer”?

    Thread Starter goldmember

    (@goldmember)

    could i just remplace the wp_nav_menu stuff with wp_list_pages?

    why would this theme not have such a basic function if this is the new wordpress default theme?

    The premise behind the use of wp_nav_menu() and its functionality is to allow end-users to create menus exactly how they want them to appear.

    This leads to the idea of not using an exclude parameter; why would you exclude something you can simply choose not to add in the first place.

    Obviously replacing wp_nav_menu with wp_list_pages is possible as well, it would just take some edits to your theme to do. The proper usage of wp_list_pages can be found in the codex.

    Thread Starter goldmember

    (@goldmember)

    so you’re saying i should just create a list using regular HTML and CSS code and not use any sort of PHP generated list???

    Thread Starter goldmember

    (@goldmember)

    nevermind. i get it now. i never used the “Menus” function in a theme before.

    Great! … and taking out the Disclaimer item lets the menu fit much better on your site.

    I am having a similar problem as I haven’t used this new feature before. However, I need to wrap some images in the menu bar to the left of the auto-generated menu. I can’t figure out a way to use this cool feature and get other items that are not standard menu links into the same line as the menu without it creating a line break.

    You’ll see I am trying to add an image called facebook.jpg to the left of the menu
    —-
    <img src=”wp-content/themes/HealthyBusiness/images/facebook.jpg”>
    <?php wp_nav_menu( array( ‘container_class’ => ‘menu-header’, ‘theme_location’ => ‘primary’ ) ); ?>
    —-

    However,
    this is the HTML that is being generated:
    ————-
    <img src=”wp-content/themes/HealthyBusiness/images/facebook.jpg”>
    <div class=”menu-header”><ul id=”menu-healthy-business” class=”menu”><li id=”menu-item-464″ class=”menu-item menu-item-type-custom current-menu-item current_page_item menu-item-home menu-item-464″>Home
    <li id=”menu-item-458″ class=”menu-item menu-item-type-post_type menu-item-458″>About
    <li id=”menu-item-459″ class=”menu-item menu-item-type-post_type menu-item-459″>Featured Video
    <li id=”menu-item-460″ class=”menu-item menu-item-type-post_type menu-item-460″>Resources
    <li id=”menu-item-461″ class=”menu-item menu-item-type-post_type menu-item-461″>Sponsorships

    <li id=”menu-item-462″ class=”menu-item menu-item-type-post_type menu-item-462″>Wellness Store
    <li id=”menu-item-463″ class=”menu-item menu-item-type-post_type menu-item-463″>Contact Us
    </div>

    ————-

    I would like the end result to be:

    ————-

    <div class=”menu-header”>

    <img src=”wp-content/themes/HealthyBusiness/images/facebook.jpg”>

    <ul id=”menu-healthy-business” class=”menu”><li id=”menu-item-464″ class=”menu-item menu-item-type-custom current-menu-item current_page_item menu-item-home menu-item-464″>Home
    <li id=”menu-item-458″ class=”menu-item menu-item-type-post_type menu-item-458″>About
    <li id=”menu-item-459″ class=”menu-item menu-item-type-post_type menu-item-459″>Featured Video
    <li id=”menu-item-460″ class=”menu-item menu-item-type-post_type menu-item-460″>Resources
    <li id=”menu-item-461″ class=”menu-item menu-item-type-post_type menu-item-461″>Sponsorships

    <li id=”menu-item-462″ class=”menu-item menu-item-type-post_type menu-item-462″>Wellness Store
    <li id=”menu-item-463″ class=”menu-item menu-item-type-post_type menu-item-463″>Contact Us
    </div>

    ————-
    any ideas?

    Actually, i can get it to work on the right side, but not the left. Wonder what’s up with that?
    https://www.healthybusinessradio.com/

    Try this article I wrote: https://wpfirstaid.com/2010/10/extend-the-wordpress-menu/

    It may help sort out the issue …

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘wp_nav_menu function help’ is closed to new replies.