Answer the question
In order to leave comments, you need to log in
I display my custom menu. The class for the active section is not added in the footer, what's the matter?
In the header, a class is added for the active section, but this class is not added
in the footer. In the header and in the footer, I add the menu like this:
if (function_exists('wp_nav_menu')) {
wp_nav_menu(array('fallback_cb' => 'custom_menu','theme_location' => 'custom-menu', 'container' => 'ul','menu_class' => 'menu'));
}
if (function_exists('register_nav_menus')) {
register_nav_menus(
array('custom-menu' => __('Custom menu'))
);
}
function custom_menu() {
echo '<ul>';
wp_list_pages('title_li=&');
echo '</ul>';
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question