Support » Fixing WordPress » Navigation not updating

  • Resolved GenericBox

    (@genericbox)


    Hi there,

    I’ve been developing a custom theme for my workplace, and I have run into an issue getting the navigation menu to refresh/update.

    See here: http://dev.jamiepoole.me/leddesign/WordPress/

    The current menu that is there should technically not exist – on the backend I have deleted all menus in hopes that would force refresh my new layout.

    But it is still there.

    Is there a way via the Database to manually reset the menu?

    I would prefer not to go this option however as my colleagues will want to make changes and it would be nice if they showed up for them straight away.

    Is it a server caching issue?

Viewing 12 replies - 1 through 12 (of 12 total)
  • Thread Starter GenericBox

    (@genericbox)

    I’ve searched the forums and there still doesn’t seem to be a definite answer – some people have just failed to correctly specify the menu and for others deleting the menu and re-creating seems to work.

    I have tried both of these solutions.

    Would appreciate if anyone can help out.

    Do you have any caching on your site or server? Have you tried deactivating all your plugins and switching to the default WP theme (twentytwelve)? Those are the standard first troubleshooting steps.

    If you delete all the menu’s in Appearance > Menus.. then WordPress will fall back and show your individual pages instead.

    This is referenced here: http://codex.wordpress.org/Function_Reference/wp_nav_menu

    Are you setting the menu location as well when you’re setting up your menus in the backend?

    Perhaps I’m confused.

    Thread Starter GenericBox

    (@genericbox)

    Switched to Default TwentyTwelve (http://dev.jamiepoole.me/leddesign/WordPress) didn’t fix issue. There are currently “no” menus defined in wp-admin.

    But I think that is because as above – it was just reverting to the page structure as no menu was present.

    I have re-added the menu and this is working in TwentyTwelve. However, when I switch back to my custom theme – or even TwentyEleven default theme – it is still reverting back to a/ The “old” menu on my custom theme, and b/ “no” menu on the TwentyEleven theme.

    Thread Starter GenericBox

    (@genericbox)

    So currently I can have 3 menus:

    – The one I want with the TwentyTwelve theme.
    – The one that shouldn’t exist anymore on my Custom theme.
    – And the one that is just a page structure / no menu on the TwentyEleven theme.

    Thread Starter GenericBox

    (@genericbox)

    My error – the TwentyEleven theme was showing no menu because it was not defined in wp-admin after changing themes.

    This has now been fixed for TwentyEleven and TwentyTwelve where the menu is working fine – however it is still displaying the technically non-existent menu on my custom theme.

    Is this a theme that you made or ??

    Thread Starter GenericBox

    (@genericbox)

    Yes, it isn’t a child theme. But I got alot of …inspiration… from the TwentyTwelve theme.

    I do not have a nav Walker, and my only navigation registration function in functions.php is the same as TwentyTwelve:

    function LedDesign_Setup(){
    	register_nav_menu('primary-menu', __('Primary Menu'));
    
    	add_theme_support('post-thumbnails');
    	set_post_thumbnail_size(1600, 535);
    
    	add_action('wp_head', 'LedDesign_Banner');
    	add_action('wp_head', 'LedDesign_Enqueue');
    }
    
    add_action('after_setup_theme','LedDesign_Setup');
    Thread Starter GenericBox

    (@genericbox)

    Do you think adding the register_nav_menu to a separate function on the init hook will make a difference?

    Instead of after_setup_theme

    Thread Starter GenericBox

    (@genericbox)

    Alrighty. Solved. I’ve lost my styles but at least I’ve got all menu items loaded/displaying correctly.

    It was a typo of all things.

    Thanks for the support.

    Possibly… I usually register nav menu’s with init

    What does your wp_nav_menu() look like in your theme? It should be referencing primary-menu correctly as the theme location

    Thread Starter GenericBox

    (@genericbox)

    Yeah all good now, I have left it in my Setup() function but in my header.php I had a typo in primary-menu.

    Thanks again.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Navigation not updating’ is closed to new replies.