WordPress.org

Ready to get started?Download WordPress

Forums

poblem with unregistering navigation. (1 post)

  1. sayed2x2
    Member
    Posted 1 year ago #

    Hi,
    I m creating a theme for a client and I m stuck at a point. (I've started from a blank theme). I registered for two navigation one for the header and the other for the footer but now I want to remove the footer navigation because I want to add some other navigation.
    I unregsitered the footer navigation

    function remove_nav(){
    		unregister_nav_menu('footer_nav');
    		}
    
    	add_action('after_setup_theme', 'remove_nav');

    and also deleted the menu from admin panel however the navigation doesn't go away. I want to register a new navigation after removing this one. but this existing footer navigation doesn't go away and its showing the same menu as the first one.I have done it several times before with other themes but it never happened to me before. is that some error?
    http://ammasbiryani.com/college/

    //For registring navigation
    	if (function_exists('register_sidebar')) {
    	register_nav_menus(
    		array(
    				'main_nav'=> 'Main Navigation Menu',
                                    'footer_nav'=> 'Footer Navigation Menu'
    		)
    
    	);
    
            //for calling the function
             	<?php wp_nav_menu( array('footer_nav' => 'Footer Navigation Menu')); ?>

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags