Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

88
Views
Wordpress custom menu displayng all pages

I have created two custom menus on my wordpress site.

Both menus setup in Appearance -> Menus. However both menus display the same set of pages which was all at the time of creation and cannot be changed despite creating two separate menus and assigning this to the locations set.

Declared in function.php

function register_my_menus() {
  register_nav_menus(
    array(
      'main-menu' => __( 'Main Menu' ),
      'extra-menu' => __( 'Store Menu' )
     )
   );
 }
 add_action( 'init', 'register_my_menus' );

Set theme location.

<?php wp_nav_menu( array( 'theme_location' => 'Main Menu', 'container_class' 'menu_class' ) ); ?>
<?php wp_nav_menu( array( 'theme_location' => 'Store Menu', 'container_class' => 'storeMenu_class' ) ); ?>
about 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Try Below Code. You have to use main-menu & extra-menu as "theme_location"

<?php wp_nav_menu( array( 'theme_location' => 'main-menu', 'container_class'=> 'menu_class' ) ); ?>
<?php wp_nav_menu( array( 'theme_location' => 'extra-menu', 'container_class' => 'storeMenu_class' ) ); ?>
about 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!