it’s hard to answer without seeing the HTML and CSS, but from your description the behaviour is correct. If you don’t want the anchor tag to take up any visible room, you should give it a display:none. If you can edit the markup you could either add a class like this
<a href="#" class="hidden"></a>
with this css in your stylesheet:
.hidden {
display: none;
}
or you could do an inline style (although not good practice)
<a href="#" style="display: none"></a>
Related Posts:
- Split up wp_nav_menu with custom walker
- How to Add to Each Menu Link with link text to data-attr?
- Removing link ” from ” menu for some “links” without JS
- Multi Level Bootstrap Navigation Menu in WordPress
- Determine if a navigation item has children
- Bootstrap dropdown nav pills not working with wp_nav_menu()
- How to move parent li to end of child ul
- Links open only on new tab or window
- Bar separated navigation by extending Walker_Page
- How to Create a Custom WordPress Navigation Menu with the Code?
- Custom Nav Walker sub-menu HTML construct
- Add class to menu ul with active child
- Make compatible custom menu widget for Twitter Bootstrap
- How to display dynamic content in start_lvl function
- Add custom text to menu
- Menu styling for last menu item
- Disable automatig SVG tag from menu
- Menus like a CMS
- Adding post excerpt into navigation menu
- Replace menu permalink/hyperlink with only menu name/slug
- wp_nav_menu add some element to container
- Use wp_nav_menu to display ALL pages
- Third level navigation class
- How to add a submenu toggle button inside all “li” elements that have a submenu?
- get_query_var(‘post_type’) not returning in a filter
- Find out if a page has no parent
- Prev / Next menu item
- Navigation Menus Depth for specific menus
- wp_nav_menu() with multiple Class
- add span class and i tag inside wp_nav_menu link anchor tag
- Prepend to start of WordPress nav loop
- Can’t include Language switch in Nav Menu
- Add within the output of
- Grey out nav buttons unless is_user_logged_in()
- How to approach this menu design?
- Trying to Create Menu in WordPress
- Reuse a custom WordPress menu on another WordPress website
- How to dynamically populate a dropdown
- Is this format possible with a custom Nav Walker class?
- two different separate sections on the same site
- How do you add a around the second level of a Menu?
- How can I add text to a single nav menu item?
- Alternative to wp_get_nav_menu_items?
- Using Zurb’s Foundation Tabs as WordPress Nav (Active Tab)
- Using my WordPress menu on another platform
- How Do I Add Images To Main Navigation Menu
- Add a submenu to wp_nav_menu
- Walker menu not displaying at all
- Hide menu from homepage
- remove menu items if user can’t read
- How to automatically redirect to first item of second navigation level in a multi-level menu?
- Locking in navigation labels before changing title?
- How to add columns to wordpress menu editor
- how to insert data in li tag of navigation
- How to Add support for sub-menu item description in wordpress?
- Current author archive in navigation menu
- Output Post ID for all nav_items
- Custom ul class
- How to create menu spread over four lines including images
- Additional navigation bar in header
- Help with WordPress Custom Nav Walker
- Why is my navigation in my onepage not working?
- Navigation item – current date in url
- Hide a menu (navigation bar) on all posts
- Is it possible to get_the_post_thumbnail (Featured Image) inside a sprintf function?
- Misleading behaviour on Menu & Theme location
- Bootstrap Theme Migrated to WordPress
- What is inside in $item in start_el function in Walker_Nav_Menu class
- Bootstrap Nav Walker Sub Menu Image
- Creating navigation out of specific IDs and their children?
- Add active class to wp_nav_menu
- Disable Top Nav Bar on Mobile
- how to configure this type of menu
- Header lists posts instead of showing primary nav menu
- Links in new menu don’t work
- Programmatically add a Navigation menu and menu items
- Site-wide tabs at WordPress website?
- Creating custom Menu for custom theme
- How to add class and span to
- Show Child of Parent Page including all other parents
- Next/previous a-like single navigation
- Show only second level menu items? [duplicate]
- Add item ONLY to the primairy navigation
- Image menu on responsive WordPress
- wp_nav_menu: indicate by id page grandparents
- individual images as navigation design TwentyTen
- WordPress Navigation default output
- How to call either page name as the nav link or navigation title?
- How to get wordpress navigation to work
- How do I show a different secondary navigation menu for each section of my website?
- Add a navigation menu item using MySQL
- how to make a walker to this (in bootstrap, i try but not work)
- Site navigation sits unstyled for a second on page reload [closed]
- how can i get the page_ID in nav li [closed]
- Custom navigation / menu output (walker?)
- How to add a class directly on a unordered list element that is a primary navigation
- How do I programatically remove Menus?
- Displaying a Custom Avatar in WP Bootstrap Navwalker Menus in WordPress
- Is there a way to make it so that I don’t get a hamburger menu, but rather a desktop style nav, when resizing to a mobile size
- Give custom class names to WP nav sub-menu