{"id":1677559,"date":"2020-07-10T12:26:21","date_gmt":"2020-07-10T12:26:21","guid":{"rendered":"https:\/\/toolset.com\/?post_type=course-lesson&#038;p=1677559"},"modified":"2020-11-23T06:15:43","modified_gmt":"2020-11-23T06:15:43","slug":"creating-a-custom-woocommerce-product-slider","status":"publish","type":"course-lesson","link":"https:\/\/toolset.com\/fr\/course-lesson\/creating-a-custom-woocommerce-product-slider\/","title":{"rendered":"Creating a Custom WooCommerce Product Slider"},"content":{"rendered":"<div class=\"wp-block-image\">\n<figure class=\" tb-image tb-image-media aligncenter\" data-toolset-blocks-image=\"5e8205a78bbc7ea54a54bb754d59de50\"><a href=\"https:\/\/toolset.com\/wp-content\/uploads\/2020\/09\/product-slider-1.png\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/toolset.com\/wp-content\/uploads\/2020\/09\/product-slider-1-500x282.png\" alt=\"Example of a slider with featured products\" class=\"wp-image-1770837\"\/><\/a><div class=\"tb-image-caption\"><figcaption>Example of a slider with featured products<\/figcaption><\/div><\/figure>\n<\/div>\n\n\n<p>In this lesson, you will learn how to create a slider with <strong>featured<\/strong> products. Each of your slides will include some of your standard WooCommerce fields and also your custom taxonomy.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Steps for creating product sliders<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Create a View for <\/strong>displaying products<\/h3>\n\n\n\n<ol class=\"wp-block-list\"><li>Edit or create a page and insert the&nbsp;<strong>View&nbsp;<\/strong>block.<\/li><li>In the View-creation wizard, enable <strong>Pagination<\/strong> and in the <strong>Select View Loop Style<\/strong> section, choose the <strong>Unformatted <\/strong>(last) option.<\/li><li>In the last step of the wizard, select <strong>Products<\/strong> as your post type.<\/li><\/ol>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Display product fields and apply custom styling<\/strong><\/h3>\n\n\n\n<ol class=\"wp-block-list\"><li>Insert a <strong>Container <\/strong>block and set its background to <strong>Image<\/strong>. <\/li><li>Make the image dynamic and link to the post&#8217;s featured image.<\/li><li>Use Toolset <strong>Heading<\/strong>, <strong>Single Field<\/strong>, and <strong>WooCommerce<\/strong> blocks to add other&nbsp;<a href=\"https:\/\/toolset.com\/glossary\/dynamic-fields\/\">dynamic fields<\/a>&nbsp;to your slider, such as the post title, product categories or your custom taxonomy.<\/li><\/ol>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Make your View slide automatically<\/strong><\/h3>\n\n\n\n<ol class=\"wp-block-list\"><li>Use the <strong>Block Navigation<\/strong> button to select the main <strong>View <\/strong>block.<\/li><li>In the right sidebar, expand the <strong>Pagination <\/strong>section.<\/li><li>Select the <strong>Pagination enabled with automatic AJAX transition <\/strong>option.<\/li><li>In the <strong>Items Per Page <\/strong>dropdown, select <strong>1<\/strong>. You can also tweak other options like the transition effect and duration.<\/li><\/ol>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Add filters to your slider<\/strong><\/h3>\n\n\n\n<p>By deafult, your slider will display all products from your site. You can limit the products by setting up filters.<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>Use the <strong>Block Navigation<\/strong> button to select the main <strong>View <\/strong>block.<\/li><li>In the right-hand sidebar, expand the <strong>Content Selection<\/strong> section.<\/li><li>Add one or more filters of your choice. <\/li><\/ol>\n\n\n\n<p>Hint: If you want to select only featured products (the ones you mark using stars in your WooCommerce backend list), you would need to use the <strong>Product Visibility<\/strong> filter set to <strong>featured<\/strong>. Please note that &#8220;Visibility&#8221; is a hidden taxonomy and you would need to enable. To do this, go to the <strong>Toolset<\/strong>&nbsp;\u2192&nbsp;<strong>Settings <\/strong>page, click the <strong>Front-end<\/strong> <strong>Content <\/strong>tab and under the <strong>Hidden custom fields<\/strong> section click the <strong>Select custom fields<\/strong> button.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\" tb-image tb-image-media aligncenter\" data-toolset-blocks-image=\"c155cabea0816ff0b2965d66387c4a78\"><a href=\"https:\/\/toolset.com\/wp-content\/uploads\/2020\/09\/filters-woocommerce.png\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/toolset.com\/wp-content\/uploads\/2020\/09\/filters-woocommerce-500x648.png\" alt=\"Setting the filter options for Product Visibility\" class=\"wp-image-1770851\"\/><\/a><div class=\"tb-image-caption\"><figcaption>Setting the filter options for Product Visibility<\/figcaption><\/div><\/figure>\n<\/div>\n\n\n<div style=\"height:30px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Change the pagination to dots<\/strong><\/h3>\n\n\n\n<ol class=\"wp-block-list\"><li>Click to select the View&#8217;s <strong>Pagination<\/strong> block.<\/li><li>In the right sidebar, change pagination controls from numbers to dots.<\/li><li>Additionally, you can expand the <strong>Advanced <\/strong>section and center align the pagination controls.<\/li><\/ol>\n","protected":false},"author":4341,"featured_media":1712673,"template":"","related-lesson":[8445],"class_list":["post-1677559","course-lesson","type-course-lesson","status-publish","has-post-thumbnail","hentry","related-lesson-e-commerce"],"_links":{"self":[{"href":"https:\/\/toolset.com\/fr\/wp-json\/wp\/v2\/course-lesson\/1677559","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/toolset.com\/fr\/wp-json\/wp\/v2\/course-lesson"}],"about":[{"href":"https:\/\/toolset.com\/fr\/wp-json\/wp\/v2\/types\/course-lesson"}],"author":[{"embeddable":true,"href":"https:\/\/toolset.com\/fr\/wp-json\/wp\/v2\/users\/4341"}],"version-history":[{"count":8,"href":"https:\/\/toolset.com\/fr\/wp-json\/wp\/v2\/course-lesson\/1677559\/revisions"}],"predecessor-version":[{"id":1853143,"href":"https:\/\/toolset.com\/fr\/wp-json\/wp\/v2\/course-lesson\/1677559\/revisions\/1853143"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/toolset.com\/fr\/wp-json\/wp\/v2\/media\/1712673"}],"wp:attachment":[{"href":"https:\/\/toolset.com\/fr\/wp-json\/wp\/v2\/media?parent=1677559"}],"wp:term":[{"taxonomy":"related-lesson","embeddable":true,"href":"https:\/\/toolset.com\/fr\/wp-json\/wp\/v2\/related-lesson?post=1677559"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}