WordPress pages specified Menu

Samar

New Member
#1
Dears, I need to customize pages in header and footer so I write
Mã:
`<?php

$args = array('theam_location' => 'Primary');

 ?>

<?php wp_nav_menu( $args ); ?>`
in header
And write
Mã:
`<?php

$args = array('theam_location' => 'Footer' );
?>


<?php wp_nav_menu( $args ); ?>`
in footer
And in Functions PHP
Mã:
 `register_nav_menus(array(
'Primary' => __('Primary Menu1'),
'Footer' => __('Footer Menu2'),
));`
Then I customize the pages from WordPress dashboard; when I put 5 pages in header menu and 2 pages in footer menu; tshowsl result is show 2 pages put in footer in both Footer and Header Bar!!

WordPress 4.9.8 Advise Please.. Thanks
 

Admin

Administrator
Thành viên BQT
#2
I thing you forgot to check the checkbox for header and footer menu separately.

Header
Mã:
<?php

    $args = array('theme_location' => 'Primary');

?>

<?php wp_nav_menu( $args ); ?>
Footer
Mã:
<?php
    $args = array('theme_location' => 'Footer' );
?>


<?php wp_nav_menu( $args ); ?>
Please check the screenshot.

sCFsH.png
 
Top