Why are some of my menu items not displaying on my menu?

Picture of menu config

I’m a backend dev learning WordPress for the first time. I’m trying to create a menu in the admin GUI, but the menu isn’t displaying all of the items that it should.

As you can see, the menu is configured to display two pages and three posts.

But it actually only displays links to the two pages. The links to the three posts are missing.

The code that renders the menu is as simple as it gets.

<?php wp_nav_menu( array( 'theme_location' => 'top-menu' ) ); ?>

So is the code that registers the menu.

<?php
function register_my_menus() {
  register_nav_menus(
    array(
      'header-menu' => __( 'Header Menu' )
     )
   );
}

add_action( 'init', 'register_my_menus' );
?>

Why on earth isn’t this working???

Read more here:: Why are some of my menu items not displaying on my menu?

Leave a Reply

Your email address will not be published. Required fields are marked *