Dropdown on hover menu possible?

Viewing 8 posts - 1 through 8 (of 8 total)
  • #19822
    giannisdallas
    Participant

    Hello again, thanks once more for this amazing theme!

    Is it possible to have a menu functionning like the menu on Pinboard theme for example?
    I would like the main category to be clickable and not repeating itself.
    If not which file I should edit in a child theme? I’m a bit lost in your file structure.

    Thank a lot

    #19824
    Daniel Tara
    Keymaster

    In your child theme’s functions.php file add this code:

    remove_filter( 'wp_nav_menu_objects', 'enlightenment_bootstrap_menu_parent_class' );

    Then in your custom styles add these rules:

    .menu-item-has-children:hover .sub-menu {
    	display: block;
    }
    #19837
    giannisdallas
    Participant

    Thank you!

    #19838
    giannisdallas
    Participant

    Although, for some reason I had to delete the filter from the bootstrap.php file.

    Remove_filter didn’t work as expected.

    #19839
    Daniel Tara
    Keymaster

    Try this instead:

    add_action( 'after_setup_theme', 'enlightenment_remove_bootstrap_menu_parent_class', 50 );
    
    function enlightenment_remove_bootstrap_menu_parent_class() {
    	remove_filter( 'wp_nav_menu_objects', 'enlightenment_bootstrap_menu_parent_class' );
    }
    #19841
    giannisdallas
    Participant

    Yes, that worked correctly

    #19904
    Chicken_3H
    Participant

    Hi Daniel.

    Thank you for this awesome free theme.

    How can I remove the duplicated main category from the menu WITHOUT the hover effect? Though looking cool, it makes the sub-menus unaccessable on any of my mobile devices. I want the default “Click-to-open” option.

    Thanks in advance for your help.
    Christian

    #19906
    Daniel Tara
    Keymaster

    Please see this reply.

Viewing 8 posts - 1 through 8 (of 8 total)

Tagged: 

You must be logged in to reply to this topic.