My menu code
<h6><?php
$theme_location = 'Footer-Customers';
$theme_locations = get_nav_menu_locations();
$menu_obj = get_term( $theme_locations[$theme_location], 'nav_menu' );
echo $menu_obj->name;
?></h6>
<?php
$footer_02 = wp_nav_menu( array('theme_location' => 'Footer-Business' ,
'container' => '',
'echo' => FALSE,
'fallback_cb' => '__return_false')
);
if ( ! empty ( $footer_02) )
{
echo $footer_02;
}
?>
May I know how to check if there is NO menu assigned to the theme_location in backend setting(/wp-admin)?
The error msg i get is as follow:
How to make its title become empty or show nothing if the menu is not set or assign
Judging by the error I’m guessing line 78 is the echoing of $menu_obj->name?
If so you can do something like the following:
Reference: PHP Manual