cart->cart_contents_count, 'theshop' ), WC()->cart->cart_contents_count ); ?> - cart->get_cart_total(); ?>
theme_location == 'primary' ) {
$items .= '' . sprintf (_n( '%d item', '%d items', WC()->cart->cart_contents_count, 'theshop' ), WC()->cart->cart_contents_count ) . '-' . WC()->cart->get_cart_total() . '';
}
return $items;
}
add_filter( 'wp_nav_menu_items', 'theshop_nav_cart', 10, 2 );
/**
* Number of columns per row
*/
function theshop_shop_columns() {
return 3;
}
add_filter('loop_shop_columns', 'theshop_shop_columns');
/**
* Add and remove actions
*/
function theshop_woo_actions() {
remove_action( 'woocommerce_before_main_content', 'woocommerce_output_content_wrapper', 10);
remove_action( 'woocommerce_after_main_content', 'woocommerce_output_content_wrapper_end', 10);
add_action('woocommerce_before_main_content', 'theshop_wrapper_start', 10);
add_action('woocommerce_after_main_content', 'theshop_wrapper_end', 10);
}
add_action('wp','theshop_woo_actions');
/**
* Theme wrappers
*/
function theshop_wrapper_start() {
echo '';
echo '';
}
function theshop_wrapper_end() {
echo '';
echo '
';
}
/**
* Before shop wrappers
*/
function theshop_before_shop_wrapper() {
echo '';
}
add_action( 'woocommerce_before_shop_loop', 'theshop_before_shop_wrapper' , 10 );
function theshop_after_shop_wrapper() {
echo '
';
}
add_action( 'woocommerce_before_shop_loop', 'theshop_after_shop_wrapper' , 40 );
/**
* Archive titles
*/
function theshop_woo_archive_title() {
echo '';
echo woocommerce_page_title();
echo '
';
}
add_filter( 'woocommerce_show_page_title', 'theshop_woo_archive_title' );