WooСommerce search by SKU, attributes, and product short description

(No Ratings Yet)
Loading...

By default, woocommerce searches by product title and description. To search by SKU, product attributes, and any other metadata (for example, the product price), you need to install the Relevanssi plugin . It can also make the search results more relevant to the query than the standard WooCommerce search. Read more

How to remove the number of products in the WooCommerce category

(No Ratings Yet)
Loading...

When displaying categories on woocommerce store pages, by default, the number of products in this category is shown in brackets. To remove it, add it to functions.php your theme has the following code:

//removing the number of products
add_filter('woocommerce_subcategory_count_html','remove_count');

function remove_count(){
 $html='';
 return $html;
}

Adding a short description in the WooCommerce product catalog

(No Ratings Yet)
Loading...

Creating a function linked to the hook:

add_action( 'woocommerce_after_shop_loop_item_title', 'add_short_description', 9 );
function add_short_description() {
	  echo  the_excerpt().'<br />';
}

If you want the short description to be cropped, the code will look like this:
Read more

How to display a WooCommerce shopping cart in the site header

(No Ratings Yet)
Loading...

To display the shopping cart button displaying the number of products in the site header, add some code to the theme file header.php, which is responsible for output of the header:

<div class="s-header__basket-wr woocommerce">
    <?php global $woocommerce; ?>
    <a href="<?php echo $woocommerce->cart->get_cart_url() ?>" class="basket-btn basket-btn_fixed-xs">
        <span class="basket-btn__label">Cart</span>
        <span class="basket-btn__counter">(<?php echo sprintf($woocommerce->cart->cart_contents_count); ?>)</span>
    </a>
</div>

Read more

How to remove sort types in WooCommerce

(No Ratings Yet)
Loading...

The following types of product sorting are available by default in WooCommerce:

  • Sort by default;
  • sorting by the last added products;
  • sorting by product rating;
  • sorting by popular products;
  • Sort by price;
  • sort by descending price.

Read more

Change the number of products on the page in WooCommerce

(No Ratings Yet)
Loading...

Sometimes for any category of WooCommerce products, or for a custom taxonomy, you need to specify the number of products on a page that is different from the default.

You can change the number of products in a row using the loop_shop_columns filter: Read more

Страница 1 из 212