Last active
November 18, 2018 22:27
-
-
Save psahalot/6df7032919459a8a8da1967aef588b42 to your computer and use it in GitHub Desktop.
add search box to off-canvas menu
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Advanced Menu - off-canvas before menu items | |
function wpba_demo_offcanvas_menu_before( $type, $settings, $id ) { ?> | |
<style> | |
.wpba-menu-content { margin-top: 50px; padding: 40px; padding-bottom: 10px; } | |
</style> | |
<div class="wpba-menu-content"> | |
<div class="wpba-menu-search"> | |
<?php echo get_search_form(); ?> | |
</div> | |
<h3>About us</h3> | |
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p> | |
</div> | |
<?php | |
} | |
add_action( 'pp_advanced_menu_before', 'wpba_demo_offcanvas_menu_before', 10, 3 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment