0

I have WordPress 5.0 / Gutenberg and my theme is Graphy. I have Chrome v. 71.0.

When I upgraded to WP.5.0 and to Gutenberg (blocks) I observed that a menu that I had made unclickable before now was clickable again.

I have tried to create a new custom link and put the URL to # and then under CSS-classes both write and not write ”unclickable” but it does not work. I have also removed the # according to the instruction below.

I have tried several times without success. And now I really do not now what to do.

I wonder, is it some bug in my theme or in WP?

Before WP 5.0 I followed this instruction:

”The easiest way to do it without a plugin or anything is to use the "Menus" function of WordPress. Here are the instructions for WordPress 4.8:

From your WordPress dashboard, go to "Appearance -> Menus" In the "Edit Menus" tab, select "Custom Links" For the URL, Enter "#" (no quotes) For the link text, enter your desired text for the top level of your drop-down menu Click the "Add to Menu" button Drag the menu item to its desired position within your menu For the menu item you just added, click the down arrow to the right of the item (it will read "custom link" to the left of the item) Remove the "#" from the URL. This - in all browsers - will convert the link to plain text. Click on the "Save Menu" button”

This instruction worked fine before WP 5.0

Someone who can help me?

Kjell Sweden

3
  • In what way isn't this working? What's happening that's not supposed to? Commented Feb 6, 2019 at 9:23
  • Can you link us to the site? Out of interest, why would you want to make a menu visible, but inactive? This isn’t great for accessibility.
    – Sam
    Commented Feb 6, 2019 at 9:48
  • This - the following text is taken from another site - is what I want: "Have you ever wanted to add some text to your WordPress menu without it being a link? There are plenty of times when this could come in handy. For example, maybe you don’t want the top tier of a drop down menu to be clickable. Or maybe you’d like to add a label to your menu for some reason (much like my blog menu above). Whatever the reason may be, adding an unclickable link to your WordPress menu is incredibly easy." My site is www.gubbenogumman.se Commented Feb 6, 2019 at 10:10

1 Answer 1

0

You may already have discovered how to make a top-tier menu item unclickable in the Gutenberg Editor/WordPress, but I am placing this here for others to read.

  1. Use the menu block inserter to create a navigation block in your header. Add a top-tier menu item and choose a page in your list of pages. I created a page called Temp for this purpose.
  2. Create any sub-menus and assign appropriate pages by clicking on the drop-down list. If your particular page is not in the list, type the name into the field. If the page exists, Gutenberg will find it.
  3. Save this menu.
  4. Go back in, focus on the top-tier menu item, and click on the "Link" icon in the control menu.
  5. In the Link box, type in a #.
  6. Save.
  7. Leave the # in the link box. You cannot leave the box empty, unlike the Classic model.
  8. You're done. The menu item is unclickable.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.