• Resolved acornrevolution

    (@acornrevolution)


    I am trying to create an additional toggle menu. I have edited the header.php and style.css so that I have a genericon that appears and looks like it should work, but it doesn’t. When I click on it, nothing happens. I have created a new siderbar, “sidebar-homework”, and also tested just using “Lorum ipsum”. Here are my edits. What am I missing?

    header.php

    <?php if ( !cat_is_ancestor_of(1, $cat)):  ?>
    					<div id="homework-toggle" class="toggle" title="<?php esc_attr_e( 'Homework', 'sorbet' ); ?>"><span class="screen-reader-text"><?php _e( 'Homework', 'sorbet' ); ?></span></div>
    				<? endif; ?>

    header.php

    <?php if ( !cat_is_ancestor_of(1, $cat)):  ?>
    		<div id="homework-toggle-nav" class="panel">
    			Lorum Ipsum
    		</div>
    	<?php endif; ?>

    style.css

    .toggles #homework-toggle:before {
      line-height: 50px;
      background-color: #000;
      content: "\f444";
    }
    .panel#homework-toggle-nav {
      background: #eee;
      border-bottom: 5px solid #000;
    }

Viewing 3 replies - 1 through 3 (of 3 total)
  • stephencottontail

    (@stephencottontail)

    Sorbet includes a little JavaScript to toggle the menu. It can be found at js/menus.js. You’ll have to edit that in order to get your new dropdown to toggle correctly. It’s pretty self-explanatory if you read the code.

    Thread Starter acornrevolution

    (@acornrevolution)

    Awesome. That worked! On to styling!

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    The theme also enqueues that script

    wp_enqueue_script( 'sorbet-menus', get_template_directory_uri() . '/js/menus.js', array( 'jquery' ), '20120206', true );

    hint *

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘New Menu Toggle?’ is closed to new replies.