• Resolved andrewcodes404

    (@andrewcodes404)


    Hi, I’m using the Navigation block, is there anyway to create a menu item that is a non clickable text item. Like to use this in a submenu in order to create a title for a group of links?
    I’ve been trying to use the fields ” Link title” and “Description”. but they don’t seem to output anything?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Moderator Kathryn Presner

    (@zoonini)

    Hi @andrewcodes404 – there are two ways:

    1. Enter # as the URL for the top-level menu item that item you want to be unclickable, or
    2. Toggle on the “Open on click” option, in the Navigation block’s Submenu settings area, as you see below. This option automatically turns the top-level item into a toggle that opens and closes the sub-menu, without making it a clickable item itself.

    Let me know how it goes!

    Thread Starter andrewcodes404

    (@andrewcodes404)

    thanks @zoonini yes of course, I was looking in both the sidebars but not on the items own pop-up menu, that should do it.
    But what about the fields ” Link title” and “Description”. How do I get that information on the frontend?

    Moderator Kathryn Presner

    (@zoonini)

    But what about the fields ” Link title” and “Description”. How do I get that information on the frontend?

    Oops, sorry I missed the second part of your question.

    The link title appears when you put your mouse over a menu item. Two things to keep in mind:

    For both reasons, link titles shouldn’t be relied on for critical information you need all visitors to see.

    As for the link description, I don’t think there’s a way to display those in block themes using the Site Editor, yet. There’s an enhancement request for that here. The “link description” is displayed on the front end in some classic themes, such as Twenty Fifteen:

    A workaround for now would be to display the link description via some custom CSS. You could also add extra styling here as well.

    /* Display link description on navigation items */
    .wp-block-navigation .wp-block-navigation-item__description {
      display: inherit;
    }

    While the Customizer is not exposed by default when using Site Editing, you can still access it manually by adding /wp-admin/customize.php after your URL. You can then add custom CSS in the Additional CSS area.

    Thread Starter andrewcodes404

    (@andrewcodes404)

    Thank you @zoonini some interesting stuff ??

    Moderator Kathryn Presner

    (@zoonini)

    You’re very welcome.

    I’ll mark this thread as resolved, but feel free to make a post post for other questions.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Menu item as a non clickable text title’ is closed to new replies.