Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1329226

    Hi
    I have used the fullwidth sub menu element to display a sub menu created in -appearance menus (online sub menu).
    I would like to have
    1. the menu item for the active page in this sub menu underlined or a different shade
    2. a hover over function on the menu

    I have tried code mentioned in previous logs to no avail, these seem to be specific to on-page sub menus. Could you point me in the right direction please (NB I am working on a site revision on localhost at the moment)
    Many thanks for your help.

    #1329296

    Hey Art_Discovery,

    Thank you for the inquiry.

    You may need to organize your pages into hierarchies or specify the parent page and child pages in order to make this work correctly or in order to automatically highlight the parent menu item when a child page is currently in view.

    The parent page can be selected in the Page Attributes box as shown in the documentation below.

    // https://wordpress.com/support/pages/page-options/#parent-page

    This is necessary in order for WordPress to tell that a certain page is connected or related to another.

    Best regards,
    Ismael

    #1329362

    Thanks Ismael,
    I have assigned a parent page to each page included in the full width sub menu. The hover and active page function still doesn’t happen in context. Should this occur as per the main menu or is extra code required? If so, can you help me with this?
    Many thanks for your help.

    #1329422

    Hi,

    Where can we check the page? Please provide the site URL in the private field. The current-menu-item or the current-page-ancestor class names should be automatically applied to the parent menu item if one of its child pages is currently in view. We can use those selectors to adjust the style of parent menu item.

    Example:

    .current-page-ancestor { 
       color: azure;
    }

    Best regards,
    Ismael

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.