Skip to content

Instantly share code, notes, and snippets.

@yousufansa
Created January 13, 2021 05:29
Show Gist options
  • Save yousufansa/8672942e976155090427237ac330d486 to your computer and use it in GitHub Desktop.
Save yousufansa/8672942e976155090427237ac330d486 to your computer and use it in GitHub Desktop.
Tokoo - Display Top bar on Handheld Header
if ( ! function_exists( 'tokoo_header_handheld' ) ) {
/**
* Displays HandHeld Header
*/
function tokoo_header_handheld() {
if( tokoo_has_handheld_header() ) : ?>
<div class="handheld-only">
<?php tokoo_top_bar(); ?>
<div class="container">
<?php do_action( 'tokoo_before_header_handheld' ); ?>
<div class="handheld-header">
<?php
/**
* @hooked tokoo_off_canvas_nav - 10
* @hooked tokoo_header_logo - 20
* @hooked tokoo_handheld_header_cart_link - 40
* @hooked tokoo_handheld_header_links - 50
*/
do_action( 'tokoo_header_handheld' ); ?>
</div>
</div>
</div>
<?php endif;
}
}
.handheld-only .top-bar {
display: block !important;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment