How to remove some specfic navigation links only from selected page/pages?

For example:

In the client site I have 5 page 1) Home 2) product 3) Services 4) Contact us 5) Blog

Read More

Only from the blog page I want to remove 2) product and 3) Services but not from other pages.

Is there any Plugin to do this?

Related posts

Leave a Reply

3 comments

  1. You can register multiple menus, and display one of them depending on the context.

    register_nav_menus( array(
        'primary' => 'Regular',
        'blog' => 'Blog',
    ) );
    

    enter image description here

    Then in your theme, you select the menu you want:

    wp_nav_menu( array(
        'theme_location' => (is_page() ? 'primary' : 'blog'),
         'menu_id' => 'nav'
    ) );
    
  2. It depends on how your page links are added. Are they listed through wp_list_pages()? Manually?

    Regardless of how you’ve done it, you will be able to exclude particular page links on certain pages by using conditional tags.

    For example:

    
    if (!is_page('contact-us'))
    {
    // pages to list when not on the contact page
    }