Close Menu
Infoceptor
  • Business
  • Finance
  • Technology
  • Health
  • Life
  • More
    • Auto
    • Food
    • Health
    • Home
    • Space
    • Travel

Subscribe to Updates

Get the latest creative news from FooBar about art, design and business.

What's Hot
Flywheel Logo

Flywheel review in 2023

June 8, 2023
Travel restrictions in Canada are different depending on where you're traveling from and to. Here's what you need to know before you go.

Canada: Traveling restrictions and what you need to know before you go

May 19, 2024
If you are planning a trip to Spain, there are some travel restrictions that must be taken into consideration.

Spain: Traveling restrictions and what you need to know before you go

May 19, 2024
Facebook X (Twitter) Instagram
Infoceptor
  • Business
    This guide will show you how to determine the value of your business using different business valuation methods.

    How to value you business – The ultimate guide for 2023

    May 9, 2024
    Have you ever thought of starting your own laundry service? Find out how with this easy guide.

    How to start a laundry service company in 2023

    May 5, 2024
    Learn about the best online payment solutions available to you. Check out what’s available, learn their pros and cons, and choose the one that best fits your needs.

    The 15 best online payment solutions in 2023

    April 27, 2024
    Learn how to create powerful backlinks for your website and increase your site's search engine ranking.

    How to build backlinks to your website

    April 25, 2024
    In this beginner's guide, we will show you the steps involved in creating a mobile app.

    Beginner’s guide on how to develop a mobile app

    April 24, 2024
  • Finance
    Learn how to build wealth and financial security. This article will share steps you can take to build a reliable cash reserve that will grow over time.

    Do you want to build wealth? Here are some ways to grow your money

    May 18, 2024
    Want to know your tax bracket? Check out our article for an overview of the different brackets and what you can expect to pay in 2022.

    Understanding IRS tax brackets – here’s what you’ll pay in 2023

    May 14, 2024
    This article will cover the best electric vehicle battery stocks to buy and invest in.

    The 10 best EV battery stocks to buy in 2023

    May 9, 2024
    The 10 most active penny stocks to watch this year is a list of the most active penny stocks ranked by total volume.

    The 10 most active penny stocks to watch in 2023

    May 8, 2024
    These electric car stocks are making a lot of money and you should consider adding them to your portfolio.

    The best electric car stocks to buy in 2023

    May 8, 2024
  • Technology
    Flywheel Logo

    Flywheel review in 2023

    June 8, 2023
    This article provides a list of the top iPhone models available today. Each model is reviewed based on features, specifications, performance, design and price point.

    Top iPhone models we’ve tested and you should get

    May 17, 2024
    Find out everything you need to know about the Apple Airpods Pro, including their price, features and if they're worth buying.

    Are Apple AirPods Pro a great choice in 2023?

    May 17, 2024
    To help you find the best responsive WordPress themes, we analyzed more than 100 themes and found those that are currently trending.

    The best responsive WordPress themes in 2023

    May 16, 2024
    These sympathy gifts make a great way to show you care while they also help your loved ones get through the tough times.

    The 15 best sympathy gifts that will show you care

    May 15, 2024
  • Health
  • Life
    These sympathy gifts make a great way to show you care while they also help your loved ones get through the tough times.

    The 15 best sympathy gifts that will show you care

    May 15, 2024
    Water bottles are a great way to stay hydrated. This article is dedicated to the most popular water bottles of the year!

    The best water bottles of 2023

    May 10, 2024
    Learn 30 weird and fun facts that will make you question everything.

    30 weird and fun facts that will make you question everything

    May 10, 2024
    Find out which cities in the US are the best for quality of life by checking out this article.

    20 best cities for quality of life in the USA

    May 7, 2024
    There are many ways to print your designs on t-shirts. Check out our list of the best printing services that offer top-notch quality at affordable prices.

    The 10 best T-shirt printing services of 2023

    May 6, 2024
  • More
    • Auto
    • Food
    • Health
    • Home
    • Space
    • Travel
Facebook X (Twitter) Instagram
Trending
  • Flywheel review in 2023
  • Canada: Traveling restrictions and what you need to know before you go
  • Spain: Traveling restrictions and what you need to know before you go
  • Do you want to build wealth? Here are some ways to grow your money
  • Our in-depth review of the Always Pan
  • Top iPhone models we’ve tested and you should get
  • Are Apple AirPods Pro a great choice in 2023?
  • The best shower heads of 2023
Infoceptor
Home»Technology»WordPress»How to use shortcodes for WooCommerce
WordPress

How to use shortcodes for WooCommerce

Asih TirtaBy Asih TirtaNovember 2, 20234 Mins Read
Facebook Twitter LinkedIn Reddit Telegram WhatsApp Pinterest Email
Share
Facebook Twitter LinkedIn

WooCommerce is the number one Ecommerce plugin for WordPress and it comes with loads of handy settings and features you can use to customize your online store.

However, many people aren’t aware that WooCommerce also offers small code snippets, called shortcodes, which you can put anywhere you want on your website to display your products or create effective CTA’s (call to action) items to drive sales.

This is a handy way to use advanced techniques without any coding skills or knowledge.

WooCommerce shortcodes

WooCommerce has a list of available shortcodes here, but we’ll cover the most frequently used and useful ones in this article.

Add shortcode

So, how do you add a shortcode?

Pages

Create a new page in your WordPress dashboard via Pages > Add New: 

Add shortcode (Gutenberg Editor)

If you’re using the Gutenberg Editor in WordPress, click the + sign to add a new block, and then search for shortcode in the search field:

Click the Shortcode to add it to your page and then put the shortcode you want into the field.

In this example, we’ll use a shortcode to show product categories:

[product_categories]

Click the Publish button to publish the page, and see the result:

That’s it! It’s pretty easy when you get the hang of it.

Add shortcode (Classic Editor)

If you’re using the Classic Editor in WordPress, paste the shortcode into the body field:

Common WooCommerce shortcodes

Now that you know how to insert WooCommerce shortcodes to your WordPress post or page, let’s cover the most basic shortcodes.

My account page

This shortcode displays the My Account page:

[woocommerce_my_account]

Cart page

This shortcode displays the customer’s cart:

[woocommerce_cart]

Checkout page

This shortcode will display the checkout page:

[woocommerce_checkout]

Order tracking

This shortcode displays the order tracking page:

[woocommerce_order_tracking]

Keep in mind that you can combine shortcodes to use both my account and order tracking shortcodes on a single page.

Below, you can find more advanced shortcodes that you can use on your online store pages.

Latest products

Displays the most recent products and automatically updates the grid each time you add new products:

[products limit="6" columns="3" orderby="date" order="DESC" visibility="visible"]

This is handy to use on your homepage as it displays the beautiful grid which dynamically updates itself, so you don’t have to touch it again.

Let’s cover the variables used in this shortcode:

limit – the number of products displayed in the grid

columns – the number of columns to use

orderby – allows you to arrange products by date, menu_order, id, popularity, rand, rating and so on

order – descending or ascending

visibility – if the products are viewable in the shop and search field

Another alternative is:

[recent_products per_page=”9″ columns=”3″ orderby=”date” order=”ASC”]

Most popular products

Displays your best selling products:

[products limit="4" columns="4" orderby="popularity" ]

Again, this grid is dynamically updated, so it’s great to use during holiday seasons for gift ideas, etc.

Products in a specific order

Displays the products in the order you choose:

[products ids="2, 11, 7, 32, 18, 13" orderby="post__in"]

Products for sale in a specific category

Displays products that are on sale in one category:

[products limit="200" columns="4" orderby="popularity" on_sale="true" category="your_category" ]

The alternative method is:

[sale_products per_page=”9″ columns=”3″ orderby=”date” order=”ASC”]

Product price with cart

Displays product price with the add to cart button:

[add_to_cart id="11"]

id – the post ID of the product

This is handy to use if you want to feature a single product in a widget or a separate page/blog post.

Related product

Allows you to display all the similar products:

[related_products per_page=”9″]

Featured product

Displays your favorite products on the page:

[featured_products per_page=”9″ columns=”3″ orderby=”date” order=”ASC”]

To make a product featured, click the star icon in the WooCommerce product list:

Top rated product

Displays your products based on reviews and ratings within the WooCommerce plugin. If you use these options, it’s a handy shortcode to display your top-rated products:

[top_rated_products per_page=”9″ columns=”3″ orderby=”date” order=”ASC”]

Best selling product

Displays your best selling products:

[best_selling_products per_page=”9″ columns=”3″ orderby=”date” order=”ASC”]

Product search

Displays an interactive search field on a page or a post:

[woocommerce_product_search]

Single product

To display a single product on your page or a post:

[products ids="18" columns="1"]

We’re using the columns option in this case so that it doesn’t take the page’s entire width as it would look a bit weird.

Category list

To display the product categories available on your store:

[product_categories]

To display only specific categories, use the following shortcode:

[product_categories ids="12, 27, 8"]

You can definitely do a lot using WooCommerce shortcodes, we recommend learning more about these to improve your online store and drive your conversions!

People also viewed:

How to build an Ecommerce store with WordPress.How to build an Ecommerce store with WordPress Helpful WooCommerce extensions and add-ons for online stores The best WooCommerce themes for an online store Best WordPress themes for building an Ecommerce website How to reorder posts in WordPress and WooCommerce
Ecommerce online store short code woocommerce
Share. Facebook Twitter LinkedIn Reddit Telegram WhatsApp Pinterest Email
Previous ArticleHow to reduce your credit card debt and boost your financial well-being
Next Article How to set up Google Analytics on a WordPress website
Asih Tirta

Asih is a Infoceptor Technology writer, she is passionate about how technology can serve people and improve lives. She helps run code camps for K to 12 to teach young girls how to code and open doors to careers in tech for women.

Related Stories

How to build an Ecommerce store with WordPress.

How to build an Ecommerce store with WordPress

March 11, 2024

Helpful WooCommerce extensions and add-ons for online stores

February 6, 2024

The best WooCommerce themes for an online store

February 5, 2024

Best WordPress themes for building an Ecommerce website

October 5, 2023

Comments are closed.

Connect
  • Facebook
  • Twitter
  • Pinterest
  • Instagram
  • YouTube
  • LinkedIn
  • Reddit
  • TikTok
Don't Miss
Flywheel Logo Reviews

Flywheel review in 2023

By Matthew Drummond

Flywheel is a fast-growing web host that offers high-performance WordPress hosting for agencies, designers, and developers.

Travel restrictions in Canada are different depending on where you're traveling from and to. Here's what you need to know before you go.

Canada: Traveling restrictions and what you need to know before you go

May 19, 2024
If you are planning a trip to Spain, there are some travel restrictions that must be taken into consideration.

Spain: Traveling restrictions and what you need to know before you go

May 19, 2024
Learn how to build wealth and financial security. This article will share steps you can take to build a reliable cash reserve that will grow over time.

Do you want to build wealth? Here are some ways to grow your money

May 18, 2024
  • Auto
    • Auto Reviews
    • Electric
    • Insurance
  • Business
    • Company
    • Government
  • Entertainment
    • Movies
    • Music
  • Finance
    • Credit Cards
    • Crypto
    • Market
    • Personal Finance
  • Food
    • Coffee
    • Drinks
    • Holidays
  • Health
  • Beauty
  • Fitness
  • Food
  • Medical
  • Home
  • Backyard
  • Bathroom
  • Bedroom
  • Cleaning
  • Furniture
  • Home Office
  • Kitchen
  • Life
  • Astrology
  • Family
  • Fashion
  • Outdoors
  • Personal
  • Pets
  • Apple
  • Audio
  • Domain Names
  • Gaming
  • Google
  • Power
  • Reviews
  • Samsung
  • Destinations
  • Gear
  • Services
  • Space
  • Tourism
  • Technology
  • Tutorials
  • Web Hosting
  • WiFi
  • WordPress
  • Travel
  • Shopping
  • Sports
  • Work
  • Stocks
  • Television
  • Web Hosting
Facebook X (Twitter) Instagram Pinterest YouTube LinkedIn Reddit TikTok
© 2026 Infoceptor

Type above and press Enter to search. Press Esc to cancel.