How to add onclick to a link in WordPress
If we want to add the "onclick" attribute to the link, then WordPress will remove it when saving the post.
To prevent this from happening, allow the use of this attribute: Read more
If we want to add the "onclick" attribute to the link, then WordPress will remove it when saving the post.
To prevent this from happening, allow the use of this attribute: Read more
To replace the WooCommerce breadcrumbs delimiter, use the filter: Read more
The following types of product sorting are available by default in WooCommerce:
Making the right robots.txt file for WordPress is very important. Thanks to him, search engines will know which pages to show in the search. That is, the search results will be just what you need, without duplicating WordPress pages. Read more
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
To remove the product header in breadcrumbs, rewrite the breadcrumbs template breadcrumb.php
Read more
By default, the_post_thumbnail () function displays html post thumbnails in this way:
<img width="400" height="500" src="" class="attachment-post-thumbnail size-post-thumbnail wp-post-image"
alt="" srcset="" >
In some cases, it is necessary to remove the width and height attributes of the displayed image. To do this, you can use the wp_get_attachment_image_src () function filter: Read more
Sometimes it is required to add a redirect to the cart or to the checkout page after adding the product to the cart.
Snippet for redirect to cart:
Read more
After the next update of WooCommerce, not all thumbnail sizes can be changed through the WordPress admin panel. It used to be like this:
Now the settings are moved to the menu item "Appearance -> Customize"
Read more