• Phil Huhn

    (@philhuhn)


    Hey:
    I’m curious how to create an item on a menu that is only text. It seems to always want a link.
    Phil

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

    (@zoonini)

    Hi @philhuhn could you explain a little bit more what you’re trying to accomplish so I can offer the most suitable solution?

    For example, are you trying to create a drop-down menu where the top-level menu item isn’t clickable, or did you have something else in mind?

    Once I better understand your goal I’ll be glad to make suggestions. Thanks!

    • This reply was modified 1 year, 12 months ago by Kathryn Presner. Reason: typo
    Thread Starter Phil Huhn

    (@philhuhn)

    Hey Kathryn:
    I originally experienced it when I wanted to create a dropdown submenu and didn’t want to have a page. Lately, I would like either a separator such as used in bootstrap and now I would like to create header text.

    Phil

    Moderator Kathryn Presner

    (@zoonini)

    I originally experienced it when I wanted to create a dropdown submenu and didn’t want to have a page.

    One way to do that is to add # in the URL field on that top-level item. Unfortunately, that has negative implications for accessibility, so that’s something to bear in mind. There’s more info and alternatives here: https://css-tricks.com/how-to-disable-links/

    Lately, I would like either a separator such as used in bootstrap and now I would like to create header text.

    There’s no built-in way in WordPress (either with block themes that use Site Editing like Twenty Twenty-Two, or classic themes) to add separators in menus. Typically you’d either need a plugin or custom CSS for that.

    If you can provide a link to your site and show me where you want to add the separator, I’d be glad to have a look directly.

    I’m not sure what you mean by adding header text in your menu, could you perhaps show me an example of what you mean? Thanks!

    Thread Starter Phil Huhn

    (@philhuhn)

    Hey Kathryn:
    The main reason is I am trying to develop CSS to implement a mega menu. So, I am developing on my laptop using localhost.

    Phil

    Moderator Kathryn Presner

    (@zoonini)

    Hi @philhuhn if you’re using CSS to style the Navigation block then you might want to try using CSS borders instead of adding an additional menu item, to create your separator effect.

    These are the blocks that can be added within the Navigation block at the moment, as you can see here.

    Spacer block
    Custom link
    Post link
    Page link
    Category link
    Tag link
    Home link
    Page list
    Search
    Social Icons
    Site Logo
    Site Title

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Pure Text Menu Item’ is closed to new replies.