'; } add_action('woocommerce_archive_description', 'before_archive_description', 1); add_action('woocommerce_before_shop_loop', 'before_archive_description', 1); function after_archive_description() { echo ''; } add_action('woocommerce_archive_description', 'after_archive_description', 40); add_action('woocommerce_before_shop_loop', 'after_archive_description', 40); function clearfix_append() { echo '
'; } // Change number or products per row to 3 add_filter('loop_shop_columns', 'loop_columns'); if (!function_exists('loop_columns')) { function loop_columns() { return 3; // 3 products per row } } } /** * WooCommerce cart button */ /** * These functions will add WooCmmerce or Easy Digital Downloads cart icons/menu items to the "top_nav" WordPress menu area (if it exists). * Please customize the following code to fit your needs. */ /** * This function adds the WooCommerce or Easy Digital Downloads cart icons/items to the top_nav menu area as the last item. */ add_filter( 'wp_nav_menu_items', 'my_wp_nav_menu_items', 10, 2 ); function my_wp_nav_menu_items( $items, $args, $ajax = false ) { // Top Navigation Area Only if ( ( isset( $ajax ) && $ajax ) || ( property_exists( $args, 'theme_location' ) && $args->theme_location === 'main_menu' ) ) { $minicart = get_minicart_template_as_variable(); //Initialize string variable $drop_down = ''; // Get theme options $cart_in_menu = get_theme_mod('smartlib_display_cart_button_in_menu', '1'); $mini_cart = '0'; if ( class_exists( 'woocommerce') && ($cart_in_menu=='1') ) { $css_class = 'menu-item menu-item-type-cart menu-item-type-woocommerce-cart '; if($mini_cart=='1'){ $drop_down = 'data-toggle="dropdown"'; } // Is this the cart page? if ( is_cart() ) $css_class .= ' current-menu-item'; $items .= '