WordPress.org

Forums

Tempera
disable parent links (5 posts)

  1. cathc
    Member
    Posted 7 months ago #

    In the Tempera theme, my main menu items have drop down submenus. I want the parent items to not link to anything, but just be placeholders for the active dropdown child items. How?

  2. Highlander79
    Member
    Posted 7 months ago #

    The parent links have been created because you made a parent page, I'm guessing with no content. You can go the pages section of the dashboard and find each parent page, or click on each and hit 'edit'.
    Anyway, once you get there, edit the permalink to be yoursite.com/#
    You must use the # symbol, because ANY OTHER SYMBOL will take you to a 404 page. The # will simply keep your clients on the same page, without opening the parent page. If I remember correctly, it also refreshes the screen.

  3. cathc
    Member
    Posted 7 months ago #

    Thanks for the instructions. Maybe it's my theme (Tempera), but it didn't work. The # doesn't stick when editing the permalink. It becomes 506-2, whatever that means.

    And the parent page is still linked, now to itself which is just a placeholder default page. I want it to go to NOTHING. To not be a link at all. Hovering over the parent should do nothing but activate the dropdown menu with the hover, so the user will move the cursor down to select a submenu item.

  4. cathc
    Member
    Posted 7 months ago #

    Anyone out there who can tell me how to disable the parent links in my main menu in the Tempera theme? I just want the child (drop down) items to be linked. Thank you.
    Here is the site:
    http://alpha.promet.cloudlook.net/

  5. iclin
    Member
    Posted 1 month ago #

    The solution is very easy through CSS. (after scratching my head for a couple hours trying to find a solution down the WP plugins rabbit hole)

    http://stackoverflow.com/questions/2091168/disable-a-link-using-css
    Thank you, Stack Overflow.

    Put this in your child theme:

    .page_item_has_children > a{
            pointer-events: none;
        }

    Basically, all parent menu list elements will have the "page_item_has_children" class. "> a" will select the actual link. Your child menu element should not be harmed. Your parent menu items will no longer be clickable.

    If your WP instance is in the cloud and you don't want to go mucking about in the files by remote access just to create a child theme, I highly recommend Orbisius Child Theme Creator in WP plugin. It allows me to create child classes via a plugin. Super easy and plain if you know CSS. (and even if you don't, it's well worth it to learn...here's my favorite CSS selectors cheatsheet: http://code.tutsplus.com/tutorials/the-30-css-selectors-you-must-memorize--net-16048)

    I hope this helps!

Reply

You must log in to post.

About this Theme

About this Topic