SitePoint Sponsor

User Tag List

Results 1 to 10 of 10
  1. #1
    SitePoint Guru
    Join Date
    Oct 2010
    Location
    Portland, Or
    Posts
    796
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    thought it was solved. Got most but not all of menu to post.

    I created several menu. So far they posted fine.
    But on the latest page I am working on they failed to load.
    http://thebigmeow.us/aboutus/

    I have this in the.php (yep two. second will be styled to go from right to left)

    Code:
    	<div class="navbar">
    		<div class="navbar-inner">
    			
    <?php wp_nav_menu( array( 'menu' => 'about' ) ); ?> 
    			
    		</div>
    			<div class="navbar-inner">
    <?php wp_nav_menu( array( 'menu' => 'aboutSub' ) ); ?> 
    			
    		</div>
        </div>
    and this in the function.php
    Code:
    register_nav_menus(
    		array(
    			'top_nav' => 'topNav',
    			'main_nav' => 'mainNav',
    			'eng_nav' => 'engMenu',
    			'tech_nav' => 'techMenu',
    			'staff_nav' => 'staffMenu',
    			'invest' => 'investMenu',
    			'about' => 'aboutMenu',
    			'aboutSub' => 'aboutMenuSub',
    			'results' => 'resultsMenu'
    		)
    	);
    They have been appropriately created in the wp-admin area for menus.
    so not quite sure what is up w/this.
    Suggestions or advice please
    Thx
    D

  2. #2
    SitePoint Guru
    Join Date
    Oct 2010
    Location
    Portland, Or
    Posts
    796
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    and actually when I go & debug w/chrome. it says the mainmenu has loaded???

  3. #3
    Barefoot on the Moon! silver trophy Force Flow's Avatar
    Join Date
    Jul 2003
    Location
    Northeastern USA
    Posts
    4,617
    Mentioned
    56 Post(s)
    Tagged
    1 Thread(s)
    The function is "register_nav_menu"--singular, not plural. It doesn't take an array of values. You need to call the function for each individual menu.

    http://codex.wordpress.org/Template_...ister_nav_menu
    Visit The Blog | Follow On Twitter
    301tool 1.1.5 - URL redirector & shortener (PHP/MySQL)
    Can be hosted on and utilize your own domain

  4. #4
    SitePoint Guru
    Join Date
    Oct 2010
    Location
    Portland, Or
    Posts
    796
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    so force to make sure I understand you correctly:
    replace what i currently have:
    Code:
    register_nav_menus(
    		array(
    			'top_nav' => 'topNav',
    			'main_nav' => 'mainNav',
    			'eng_nav' => 'engMenu',
    			'tech_nav' => 'techMenu',
    			'staff_nav' => 'staffMenu',
    			'invest' => 'investMenu',
    			'about' => 'aboutMenu',
    			'aboutSub' => 'aboutMenuSub',
    			'results' => 'resultsMenu'
    		)
    	);
    with:

    register_nav_menu('top_nav', 'topNav');
    register_nav_menu(about', 'aboutMenu');
    register_nav_menu('tech_nav', 'techMenu');

    etc...
    is that correct?
    Thank you
    D

  5. #5
    Barefoot on the Moon! silver trophy Force Flow's Avatar
    Join Date
    Jul 2003
    Location
    Northeastern USA
    Posts
    4,617
    Mentioned
    56 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by pdxSherpa View Post
    so force to make sure I understand you correctly:
    replace what i currently have:
    Code:
    register_nav_menus(
            array(
                'top_nav' => 'topNav',
                'main_nav' => 'mainNav',
                'eng_nav' => 'engMenu',
                'tech_nav' => 'techMenu',
                'staff_nav' => 'staffMenu',
                'invest' => 'investMenu',
                'about' => 'aboutMenu',
                'aboutSub' => 'aboutMenuSub',
                'results' => 'resultsMenu'
            )
        );
    with:

    register_nav_menu('top_nav', 'topNav');
    register_nav_menu(about', 'aboutMenu');
    register_nav_menu('tech_nav', 'techMenu');

    etc...
    is that correct?
    Thank you
    D
    Yep
    Visit The Blog | Follow On Twitter
    301tool 1.1.5 - URL redirector & shortener (PHP/MySQL)
    Can be hosted on and utilize your own domain

  6. #6
    SitePoint Guru
    Join Date
    Oct 2010
    Location
    Portland, Or
    Posts
    796
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

  7. #7
    Barefoot on the Moon! silver trophy Force Flow's Avatar
    Join Date
    Jul 2003
    Location
    Northeastern USA
    Posts
    4,617
    Mentioned
    56 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by pdxSherpa View Post
    Hm, that function didn't come up in my search for some reason. Sorry about that.

    You should be able to use it like in your first post, which seems to be correct.

    Do you have PHP errors enabled?
    Visit The Blog | Follow On Twitter
    301tool 1.1.5 - URL redirector & shortener (PHP/MySQL)
    Can be hosted on and utilize your own domain

  8. #8
    SitePoint Guru
    Join Date
    Oct 2010
    Location
    Portland, Or
    Posts
    796
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    heck no problem. Thank you for trying to answer my questions to begin w/.
    I had also seen the multiple menus in two video tutorials. But anyway...No. no php errors.
    all the tags seem to be correct to me.

  9. #9
    Barefoot on the Moon! silver trophy Force Flow's Avatar
    Join Date
    Jul 2003
    Location
    Northeastern USA
    Posts
    4,617
    Mentioned
    56 Post(s)
    Tagged
    1 Thread(s)
    Is there any HTML code being generated inside your navbar-inner div tags?
    Visit The Blog | Follow On Twitter
    301tool 1.1.5 - URL redirector & shortener (PHP/MySQL)
    Can be hosted on and utilize your own domain

  10. #10
    SitePoint Guru
    Join Date
    Oct 2010
    Location
    Portland, Or
    Posts
    796
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    hi. nope.
    and what is weird is that it works on my sandbox...
    my latest file has



    Code:
    <?php wp_nav_menu( array( 'menu' => 'staffMenu' ) ); ?>
    on my sandbox it gives me the items i picked. live it defaults to a diff menu.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •