• Resolved kaitlyn1995

    (@kaitlyn1995)


    Hi everyone!

    Thanks in advance for your help. I’ve created a menu but where it says “about us” with the drop down, I would like it to say “more” and give the option to place the pages under the “more” section instead of under “about us”. I hope that makes sense. I have Elementor Pro & I’m using Astra. Is there a plug-in or anything at all? Honestly willing to buy a plug-in at this point haha thanks for any help received! It’s much appreciated.

    Stay healthy

    • This topic was modified 4 years, 8 months ago by Jan Dembowski. Reason: Moved to Fixing WordPress, this is not an Everything else WordPress topic

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator bcworkz

    (@bcworkz)

    If I understand your question correctly, you don’t need a plugin. You can change the label used for menu items, but the link will still go to the same linked page. You could instead add a new custom links menu item. If you set the URL value to #, clicking it will just reload the same page.

    If you add a new item, you can drag items currently under About Us over to be under the More item instead. You can delete the About Us menu item if you like. This is all done in the menus admin screen. Access it through the customizer or Appearance > Menus

    Thread Starter kaitlyn1995

    (@kaitlyn1995)

    Hi!

    Yes, you understood it. I ended up being able to achieve this (kind of). I had to create a new page labeled “more” and create some content for it so that way if people landed on it, they have something to look at. I really just wanted it to be an option that wasn’t able to be clicked on, it was just simply a place holder for the word “more” for the menu to drop down, but this option of creating a new page with content worked as well!

    Thanks for your time!

    Moderator bcworkz

    (@bcworkz)

    You’re welcome. I didn’t quite grasp what you’re after until your reply. I had a client not long ago with the same desire. I disabled the menu item with some custom code. Hooking the ‘wp_nav_menu_main_items’ filter and searching/replacing the page’s link with a span tag. Pretty crude and hacky really. If the “more” page is a reasonable solution for you it’s a better solution. For the sake of presenting options, I put this in their custom/child theme’s functions.php:

    add_filter( 'wp_nav_menu_main_items', 'bcw_no_link', 10, 2 );
    function bcw_no_link( $items, $args ) {
    	$items = str_replace(
    	'<a href="https://example.com/additional-services/">Additional Services</a>',
    	'<span class="add-serv">Additional Services</span>',
    	$items );
    	return $items;
    }

    If anyone should alter the menu item this code will then fail to work.

    Thread Starter kaitlyn1995

    (@kaitlyn1995)

    Thank you! I appreciate the help

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Adding the option “more” to a drop down menu’ is closed to new replies.