admin管理员组

文章数量:1332881

In my child theme I have top navigation and custom navigation (archive menu). When I add new page to archive menu, same page gets added to top nav. In the admin top nav doesn't show new page though,however, in the browser there's new page showing in top nav.

I unchecked 'Automatically add new top-level pages to this menu' in my top nav but it didn't help

  function archive_menu() {
  register_nav_menu('archive_menu',__( 'Archive' ));
}
add_action( 'init', 'archive_menu' );

output in index.php

<?php
  wp_nav_menu(

    array(
        'theme_location'=> 'archive_menu'
          
  )
);?>

Question: Is there a way to stop new page added to top nav and only have new page added to my archive nav.

BACKEND ADMIN

This is how my custom menu looks in the child theme admin

This is how my primary menu looks in the child theme admin

This is primary (top) nav in the browser (red arrow shows 'archive' menu item which gets added automatically even though I didn't add it in the admin).

本文标签: child theme automatically adds new page to top menu instead of only custom menu