WordPress.org

Ready to get started?Download WordPress

Forums

Clean Yeti Basic
[resolved] Dropdown menus not working in 2.0.1 (5 posts)

  1. Daedalon
    Member
    Posted 7 months ago #

    We made good use of the dropdown menus with our child theme of Clean Yeti Basic 1.1.1. Upgrading CYB to 2.0.1 broke them: mouseover doesn't show the child-level menu entries anymore.

  2. Richard LaFranchi
    Member
    Theme Author

    Posted 7 months ago #

    Do you have custom code for the menu in your child theme? If so I can take a look at it and come up with a fix. I know that for one I had to add data-topbar to the nav element like so

    <nav class="top-bar" data-topbar>
          .....
    </nav>
  3. Daedalon
    Member
    Posted 7 months ago #

    Thanks for the reply! Yes, we have custom code. Attached below. Adding data-topbar didn't help. The code is otherwise similar to the default code, but aligns the default menu to the left and adds a secondary menu that's aligned to the right.

    The same code (without data-topbar) worked in 1.1.1 and it was possible to see child-level menu entries.

    // Custom menu
    if ( ! function_exists('childtheme_override_access') ):
    function childtheme_override_access() {
    	?>
            <div id="access">
                <nav class="top-bar" data-topbar>
                    <ul class="title-area">
                    <!-- Title Area -->
                        <li class="toggle-topbar menu-icon"><a href="#"><span></span></a></li>
                        <li class="name">
                            <h1><a href="<?php echo esc_url(home_url()); ?>/" title="<?php bloginfo('name'); ?>" rel="home"><?php bloginfo('name'); ?></a></h1>
                        </li>
                    </ul>
    
                    <section class="top-bar-section">
    <?php
        	if ( ( function_exists("has_nav_menu") ) && ( has_nav_menu( apply_filters('cleanyetibasic_primary_menu_id', 'primary-menu') ) ) ) {
    			// Main navigation menu to the left
    			$args               = cleanyetibasic_nav_menu_args();
    			$args['menu_class'] = 'left';
        	    echo  wp_nav_menu( $args );
    			// Secondary menu to the right
    			$args               = cleanyetibasic_nav_menu_args();
    			$args['menu']       = 'secondary-menu';
        	    echo  wp_nav_menu( $args );
        	}
    ?>
                    </section>
                </nav>
            </div><!-- #access -->
    <?php
    }
    endif;
  4. Richard LaFranchi
    Member
    Theme Author

    Posted 7 months ago #

    I can't manage to recreate the problem. I've inserted your code to test it out and the child elements seem to be working fine. It may be a javascript error. Which browser are you using? Have you tried different browsers?

    Depending on which browser you are using, you can check the console for errors by right-click -> inspect element and then click on the console tab. Let me know what you find.

  5. Daedalon
    Member
    Posted 7 months ago #

    Thanks for looking into this. Based on that I was able to locate the issue to be with CSS. Were the some CSS changes related to this between 1.1.1 and 2.0.1 tha could have caused our rules to not work, or was it just our mishap? Could easily have been.

    Marking this as resolved.

Reply

You must log in to post.

About this Theme

About this Topic

Tags

No tags yet.