'empty' page button

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #14474
    jupatisan
    Member

    Hello,

    I’ve a question. How can I remove a link in a page button.
    I need some buttons just to show the subitems. So without a link to a page.

    Will there be an easy way to achieve this?

    Thanks a lot!
    Sandra

    #14502
    Raghavendra
    Moderator

    Some users have done the same by removing the link in Appearance->Menus manually (sort of a hack to achieve this) but unfortunately this breaks the theme since WordPress expects each menu item to be a link. I would strongly recommend not doing this.

    We will update you on a way to achieve this via CSS shortly.

    #14504
    Veena
    Moderator

    Pls try the below custom CSS –

    li#menu-item-4971 {
      pointer-events: none;
    }
    

    you need to replace 4971 with your menu item id.

    #14550
    jupatisan
    Member

    Thank you both,

    Phoenix, I’ve tried this in the element inspector. The button is now without a link but it also doesn’t show the subitems anymore .

    If it will be to hard to change this i will consider making a menu without subitems.
    Please let me know.

    Thank you!

    #14558
    Raghavendra
    Moderator

    Looks like there is no way around this for now without significant changes in JS code. WordPress itself does not let you have an item without link by default unless you force it via hack.

    I would personally recommend you keep the link – pointed to the most important page in the dropdown menu. Or create a page which is an index to the pages linked to in the submenu items (A default about us page which links to the subitems like Team, Pricing etc. which are subitems in menu). That’s how most users handle this and we do the same for our demo site.

    #14578
    jupatisan
    Member

    okay, I ‘ll do that. Thank you for your answers and advice .

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘'empty' page button’ is closed to new replies.