how to get woocommerce product category id in wordpress

Description

WooCommerce Product Slider/Carousel is an best product slider to slide your WooCommerce Product, Best Selling Product and Featured Product. You can easily display this product slider in your theme using shortcode.

You can sort product by category by adding category ID in the shortcode as a shortcode parameter.

Plugin add a sub tab under “Products –> Product Slider – How It Works” for more details.

WooCommerce product slider / carousel allows you to showcase your products in a nice sliding manner.

This plugin using the original loop form WooCommerce thats means it will display your product design from your theme plus style.

View DEMO | PRO DEMO and Features for additional information.

Also work with Gutenberg shortcode block.

This plugin contain 3 shortcode:

1) Display WooCommerce product in slider / carousel view

2) Display WooCommerce Best Selling Product in slider / carousel view

3) Display WooCommerce Featured Product in slider / carousel view

Stunning Features:

  • Featured products slider
  • Displaying Latest/Recent Products Slider
  • Best Selling Product slider
  • Sort by category
  • 100% Mobile & Tablet Responsive
  • Awesome Touch-Swipe Enabled
  • Added a custom design
  • Translation Ready
  • Work in any WordPress Theme
  • Created with Slick Slider
  • Lightweight, Fast & Powerful
  • Set Number of Columns you want to show
  • Slider AutoPlay on/off
  • Navigation show/hide options
  • Pagination show/hide options
  • Unlimited slider anywhere
  • And more features coming soon!

You can use Following parameters with shortcode

  • design:
    design=”design-1″ (Added a design parameter for custom designing. By default it will take design from wooCommerce OR from your theme. )
  • Display Product by category:
    cats=”category-ID”
  • limit:
    limit=”5″ ( ie Display 5 product at time. By defoult value is -1 ie all )
  • Display number of products at time:
    slide_to_show=”2″ (Display no of products in a slider )
  • Number of products slides at a time:
    slide_to_scroll=”2″ (Controls number of products rotate at a time)
  • Pagination and arrows:
    dots=”false” arrows=”false” (Hide/Show pagination and arrows. By defoult value is “true”. Values are true OR false)
  • Autoplay and Autoplay Speed:
    autoplay=”true” autoplay_speed=”1000″
  • Slide Speed:
    speed=”3000″ (Control the speed of the slider)
  • slider_cls:
    slider_cls=”products” (This parameter target the wooCommerce default class for product looping. If your slider is not working please check your theme product looping class and add that class in this parameter)

PRO Features :

Premium Version

  • 3 shortcodes with various parameters.
    [products_slider] OR [products_slider cats="CATEGORY-ID"]
    [bestselling_products_slider] OR [bestselling_products_slider cats="CATEGORY-ID"]
    [featured_products_slider] OR [featured_products_slider cats="CATEGORY-ID"]
  • 3 Widgets.
  • 15 Designs
    View PRO DEMO and Features for additional information.

How to install :

Screenshots

  • Display WooCommerce product in slider / carousel view
  • Display WooCommerce Best Selling Product in slider / carousel view
  • Display WooCommerce Featured Product in slider / carousel view
  • Shortcodes

Installation

  1. Upload the ‘woocommerce-product-slider-and-carousel-with-category’ folder to the ‘/wp-content/plugins/’ directory.
  2. Activate the “woocommerce-product-slider-and-carousel-with-category” list plugin through the ‘Plugins’ menu in WordPress.

How to install :

This plugin contain there shortcode:

1) Display WooCommerce product in slider / carousel view
[products_slider] OR [products_slider cats=”CATEGORY-ID”]

2) Display WooCommerce Best Selling Product in slider / carousel view
[bestselling_products_slider] OR [bestselling_products_slider cats=”CATEGORY-ID”]

3) Display WooCommerce Featured Product in slider / carousel view
[featured_products_slider] OR [featured_products_slider cats=”CATEGORY-ID”]

We have targeted

    as you can check wooCommerce default class for product looping BUT in your theme i think you have changed the class name from
    to

File under templates–>loop–> loop-start.php

There are simple solution with shortcode parameter

  • slider_cls:
    slider_cls=”products” (This parameter target the wooCommerce default class for product looping. If your slider is not working please check your theme product looping class and add that class in this parameter)

Leave a Reply

Your email address will not be published. Required fields are marked *