Short codes in Woo Commerce -8

Short codes in Woo Commerce -8

WooCommerce accompanies a few shortcodes that can be utilized to embed content inside posts and pages. Shortcodes can be utilized on pages and posts in WordPress. . In block editor, there is a shortcode block you can paste the shortcode directly. and in classic editor, you can paste the shortcode on the page or post.

Page Shortcodes

  • [woocommerce_cart] – shows the cart page
  • [woocommerce_checkout] – shows the checkout page
  • [woocommerce_my_account] – shows the user account page
  • [woocommerce_order_tracking] – shows the order tracking form

Products

The [products] shortcode permits you to show items by post ID, SKU, categories, attributes, with help for pagination, irregular arranging, and item labels, swapping the requirement for products shortcodes, for example, [featured_products], [sale_products], [best_selling_products], [recent_products], [product_attribute], and [top_rated_products]

Product Category

These two shortcodes will show your item classifications on any page.

  • [product_category] – Will show items in a predefined product category.
  • [product_categories] – Will show all your product categories.

Show Product Attributes

  • limit – The quantity of items to show. Defaults to and – 1 (show all) when posting items, and – 1 (show just for) classifications.
  • columns – The quantity of sections to show. Defaults to 4.
  • paginate – Toggles pagination on. Use related to restrict. Defaults to bogus set to consistent with paginate .
  • orderby – Sorts the items showed by the entered alternative. At least one alternatives can be passed by adding the two slugs with a space between them. Accessible alternatives are:
  • date – The date the item was distributed.
  • id – The post ID of the item.
  • menu_order – The Menu Order, whenever set (lower numbers show first).
  • popularity – The quantity of buys.
  • rand – Randomly request the items on page load (may not work with locales that utilization storing, as it could save a particular request).
  • rating – The normal item appraising.
  • title – The item title. This is the default orderby mode.
  • skus – Comma-isolated rundown of item SKUs.
  • category – Comma-isolated rundown of class slugs.
  • tag – Comma-isolated rundown of label slugs.
  • order – States whether the item request is rising (ASC) or dropping (DESC), utilizing the strategy set in orderby. Defaults to ASC.
  • class – Adds a HTML covering class so you can change the particular yield with custom CSS.
  • on_sale – Retrieve marked down items. Not to be utilized related to best_sellingor top_rated.
  • best_selling – Retrieve the top rated items. Not to be utilized related to on_sale or top_rated.
  • top_rated – Retrieve first class items. Not to be utilized related to on_saleor best_selling.

Instances of Product Scenarios

[products limit=”4″ columns=”4″ orderby=”popularity” class=”quick-deal” on_sale=”true” ]

2 thoughts on “Short codes in Woo Commerce -8

Post Your Comments & Reviews

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

*

*