Last active
November 26, 2018 13:10
-
-
Save aslamahamed13/d54f573a2d7b4b8084136587a59b2d09 to your computer and use it in GitHub Desktop.
Pizzaro - Requirment
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
add_action( 'init', 'pz_child_rearrange_loop_product_header', 20 ); | |
function pz_child_rearrange_loop_product_header() { | |
add_filter( 'pizzaro_header_v2', 'pizzaro_primary_split_navigation', 40 ); | |
remove_action( 'pizzaro_header_v2', 'pizzaro_header_info_wrapper', 39 ); | |
remove_action( 'pizzaro_header_v2', 'pizzaro_header_navigation_link', 40 ); | |
remove_action( 'pizzaro_header_v2', 'pizzaro_header_info_wrapper_close', 51 ); | |
remove_action( 'pizzaro_header_v2', 'pizzaro_header_cart', 50 ); | |
} | |
if ( ! function_exists( 'pizzaro_primary_split_navigation' ) ) { | |
function pizzaro_primary_split_navigation() { | |
if ( apply_filters( 'pizzaro_show_primary_navigation', true ) ) { | |
?> | |
<nav id="site-navigation" class="main-navigation" role="navigation" aria-label="<?php esc_html_e( 'Primary Navigation', 'pizzaro' ); ?>"> | |
<button class="menu-toggle" aria-controls="site-navigation" aria-expanded="false"><span class="close-icon"><i class="po po-close-delete"></i></span><span class="menu-icon"><i class="po po-menu-icon"></i></span><span class=" screen-reader-text"><?php echo esc_attr( apply_filters( 'pizzaro_menu_toggle_text', esc_html__( 'Menu', 'pizzaro' ) ) ); ?></span></button> | |
<div class="primary-navigation"> | |
<?php | |
wp_nav_menu( apply_filters( 'pizzaro_main_menu_args', array( | |
'theme_location' => 'secondary_menu', | |
'container' => false, | |
'fallback_cb' => 'pizzaro_nav_menu_fallback', | |
) ) ); | |
?> | |
</div> | |
</nav> | |
<?php | |
} | |
} | |
} | |
register_nav_menus( array( | |
'secondary_menu' => 'Secondary Menu', | |
) ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment