';
$nx_top_cart .= '
';
$nx_top_cart .= '
';
$nx_top_cart .= '
';
$nx_top_cart .= '';
return $nx_top_cart;
}
}
/*-----------------------------------------------------------------------------------*/
/* Adding login logout menu item */
/*-----------------------------------------------------------------------------------*/
add_filter( 'wp_nav_menu_items', 'idesign_add_loginout_link', 10, 2 );
function idesign_add_loginout_link( $items, $args ) {
//$hide_login = of_get_option('hide_login');
$show_login = get_theme_mod('show_login', 0);
if( $show_login == 1 ){
if (is_user_logged_in() && $args->theme_location == 'primary') {
$items .= '';
}
elseif (!is_user_logged_in() && $args->theme_location == 'primary') {
$items .= '';
}
}
return $items;
}
// archive remove title
//add_filter( 'woocommerce_show_page_title', function() { return false; } );
//add_filter('woocommerce_show_page_title',false);
add_filter( 'woocommerce_show_page_title' , 'woo_hide_page_title' );
/**
* woo_hide_page_title
*
*/
function woo_hide_page_title() {
return false;
}
// Ensure cart contents update when products are added to the cart via AJAX (place the following in functions.php)
// add_filter('add_to_cart_fragments', 'idesign_header_add_to_cart_fragment');
add_filter('woocommerce_add_to_cart_fragments', 'idesign_header_add_to_cart_fragment');
function idesign_header_add_to_cart_fragment( $fragments ) {
global $woocommerce;
ob_start();
?>
cart->cart_contents_count); ?>