designersvsoft
designersvsoft

Reputation: 1859

WP nav menu bug

I have used WP nav menu in my website. It works fine. I have added the sub link under the home link. But it is not properly displayed. Please refer the screenshot. enter image description here

In the above image, "support our work" sub link is fine. But the Home sub link is not properly displayed. I need "News, Calendar, Like Us On FaceB" displays under the HOME link similar to "Support our work". Home Page does not accept the sub links.

Upvotes: 0

Views: 179

Answers (2)

Vijaya Narayanasamy
Vijaya Narayanasamy

Reputation: 468

Try to add theme_location => 'secondary'

Upvotes: 0

Wouter
Wouter

Reputation: 11

When you have a static page as home page it is possible.

Go to Settings, Reading, Front page displays. Then select your "Front page", that will appear in the menu as the home link.

Then in functions.php of your theme add this code:

function my_page_menu_args( $args ) {
    $args['show_home'] = false; // Do not show 'home' link in the menu.
    return $args;
}
add_filter('wp_page_menu_args', 'my_page_menu_args', 1000);

In the menu, the subpages of the selected page, will now appear as submenu items.

Upvotes: 1

Related Questions