Skip to content

FluentCart Shortcodes ​

Shortcodes are like "magic codes" that allow you to display your store's products, buttons, and pages anywhere on your WordPress site. Whether you are using a blog post, a custom landing page, or a sidebar, FluentCart shortcodes give you the flexibility to build your shop exactly how you want it.

1. The Product Catalog Shortcode ([fluent_cart_products]) ​

The [fluent_cart_products] shortcode is the easiest way to show a grid of products. It's perfect for your main shop page, a "Featured Products" section on your homepage, or a specific category gallery.

Basic Usage ​

To show your standard product list with default settings, simply use:

text
[fluent_cart_products]

Filtering by Product IDs ​

You can show specific products by passing one or more product IDs. This is useful when you want to highlight a handpicked selection of items on a landing page or a promotional section.

text
// Show a single product
[fluent_cart_products ids="433"]

// Show multiple products
[fluent_cart_products ids="344,346,347"]

To hide certain products from the list, use the exclude_ids parameter:

text
// Exclude a single product
[fluent_cart_products exclude_ids="344"]

// Exclude multiple products
[fluent_cart_products exclude_ids="3595,3493"]

Note: If you pass an ID that does not exist (e.g., ids="999999"), no products will be displayed.

Filtering by Category ​

You can narrow the product list down to one or more categories. Categories can be referenced by their slug or their term ID — whichever is more convenient.

text
// Filter by a single category slug
[fluent_cart_products category="cloths"]

// Filter by multiple category slugs
[fluent_cart_products category="cloths,shoes"]

// Filter by a single category term ID
[fluent_cart_products category_id="9"]

// Filter by multiple category term IDs
[fluent_cart_products category_id="9,12"]

// Combine a slug and an ID together
[fluent_cart_products category="hoodies" category_id="8"]

Category filters also work seamlessly with pagination. For example, the following shortcode shows two products per page with numbered pagination, and the category filter persists when your visitors navigate between pages:

text
[fluent_cart_products category="hoodies" per_page="2" paginator="numbers"]

Note: If you pass a category slug that does not exist (e.g., category="nonexistent-category-xyz"), the filter is ignored and all products are shown.

Filtering by Any Taxonomy ​

For anything beyond categories, use the taxonomies attribute. It takes term IDs only, grouped by taxonomy: taxonomy:id,id, with a | between taxonomies when you need more than one.

text
// Products tagged with brand term 67
[fluent_cart_products taxonomies="product-brands:67"]

// Two brand terms and one category term, all at once
[fluent_cart_products taxonomies="product-brands:67,82|product-categories:9"]

This works with product-categories, product-brands, and any custom taxonomy your store has registered on products, such as a store-added product-tags taxonomy. A taxonomy that isn't registered on products, or a term that doesn't belong to the taxonomy you named, matches nothing rather than widening the list.

Note: This is a different setting from the taxonomies key inside custom_filters in Advanced Usage below, which only decides which taxonomy filters show in the shopper-facing sidebar. The taxonomies attribute here narrows the products the shortcode itself displays.

Filtering by Product Type & Sale Status ​

Use the product_type parameter to display only a specific type of product, or use on_sale to showcase discounted items.

text
// Simple products only
[fluent_cart_products product_type="simple"]

// Variation products only
[fluent_cart_products product_type="simple_variations"]

// Physical products only
[fluent_cart_products product_type="physical"]

// Digital products only
[fluent_cart_products product_type="digital"]

// Subscription products only
[fluent_cart_products product_type="subscription"]

// One-time (non-subscription) products only
[fluent_cart_products product_type="onetime"]

// Only products currently on sale
[fluent_cart_products on_sale="yes"]

Tip: Empty parameter values (e.g., ids="", category="", product_type="") are safely ignored, so you don't have to worry about accidental blank values breaking your page.

Sorting Products ​

Control the order in which products appear using the sort_by parameter for common presets, or the orderby and order parameters for more granular control.

text
// Sort by price, ascending (using orderby + order)
[fluent_cart_products orderby="price" order="ASC"]

// Price low to high
[fluent_cart_products sort_by="price-low"]

// Price high to low
[fluent_cart_products sort_by="price-high"]

// Alphabetical A–Z
[fluent_cart_products sort_by="name-asc"]

// Alphabetical Z–A
[fluent_cart_products sort_by="name-desc"]

// Newest first
[fluent_cart_products sort_by="date-newest"]

// Oldest first
[fluent_cart_products sort_by="date-oldest"]

Layout & Display ​

Adjust the number of columns and the view mode to match the look and feel of your page.

text
// Show products in a 3-column grid
[fluent_cart_products columns="3"]

// 6 products per page in a 3-column grid
[fluent_cart_products limit="6" columns="3"]

// 2-column grid view
[fluent_cart_products columns="2" view_mode="grid"]

// List view with 4 products per page and numbered pagination
[fluent_cart_products per_page="4" view_mode="list" paginator="numbers"]

Combining Parameters ​

The real power of the shortcode comes from mixing and matching parameters. Here are a few practical combinations:

text
// Paginate through specific products, one per page
[fluent_cart_products ids="433,434" per_page="1" paginator="numbers"]

// Specific products in a custom 3-column layout
[fluent_cart_products ids="433,434,435" columns="3" per_page="3"]

// Category products, exclude one, newest first
[fluent_cart_products category="hoodies" exclude_ids="433" sort_by="date-newest"]

// Digital products in 3 columns, sorted by price, 6 per page
[fluent_cart_products product_type="digital" columns="3" sort_by="price-low" per_page="6"]

Advanced Usage (Filters & Sidebar) ​

You can also enable a sidebar filter and configure it with JSON-based settings. Here is a version that shows 4 products with a sidebar filter:

text
[fluent_cart_products 
    per_page=4 
    live_filter='false' 
    enable_filter='true' 
    paginator='numbers' 
    custom_filters='{"enabled":true,"live_filter":true,"taxonomies":"product-categories,product-brands","price_range":"price_range"}' 
    filters='{"enabled":true,"sort_by":"name-desc"}'
]

Parameter Reference ​

ParameterDescriptionDefaultOptions
idsShow only the products matching these IDs. Accepts a single ID or a comma-separated list.—Any valid product ID(s) (e.g., 433 or 344,346,347)
exclude_idsHide specific products from the list. Accepts a single ID or a comma-separated list.—Any valid product ID(s) (e.g., 344 or 3595,3493)
categoryFilter products by one or more category slugs.—Comma-separated slugs (e.g., cloths or cloths,shoes)
category_idFilter products by one or more category term IDs.—Comma-separated IDs (e.g., 9 or 9,12)
taxonomiesFilter products by term IDs from any taxonomy registered on products.—taxonomy:id,id, with | between taxonomies (e.g., product-brands:67,82|product-categories:9)
product_typeShow only products of a specific type.—simple, simple_variations, physical, digital, subscription, onetime
on_saleShow only products that are currently discounted.—yes
sort_byA quick preset for sorting products.name-ascname-asc (A–Z), name-desc (Z–A), price-low, price-high, date-newest, date-oldest
orderbyThe field to sort products by (use with order).—title, price, date, id
orderSort direction (use with orderby).DESCASC, DESC
columnsNumber of columns in the product grid.—1 to 6
limitAnother name for per_page. Sets how many products show per page.—Any number (e.g., 6, 10)
view_modeChoose between a grid layout or a list layout.gridgrid, list
per_pageHow many products to show on one page.10Any number up to 100 (e.g., 4, 8, 20)
paginatorHow visitors move through more products.scrollscroll (load more as the visitor scrolls), numbers (numbered pages)
enable_filterShow or hide the filter sidebar on the left/right.falsetrue, false
live_filterIf "true," products update instantly as you click filters.falsetrue, false
custom_filtersA list of settings to control category and price filters.—See JSON guide below
filtersSettings for how products are sorted (Name, Price, etc.).—See JSON guide below

A Quick Look at Filter Settings (JSON) ​

custom_filters object:

  • enabled: Set to true to show your custom category/brand filters.
  • live_filter: Set to true for instant, "no-reload" updates.
  • taxonomies: Tell the plugin what to show (e.g., "product-categories,product-brands").
  • price_range: Include a price slider by adding "price_range".

filters object:

  • sort_by: Choose how products appear first. Options: name-asc, name-desc, price-low, price-high, date-newest, date-oldest. The filters attribute only takes effect when enable_filter is true.

2. Checkout Button Shortcode ([fluent_cart_checkout_button]) ​

This shortcode creates a button that sends customers straight to the checkout page or opens a quick "Buy Now" popup. It is perfect for landing pages and promotions where you want to make buying as fast as possible.

Basic Usage ​

text
[fluent_cart_checkout_button variation_id="113" instant_checkout="yes"]

Supported Attributes ​

AttributeDescription
button_textChanges what the button says. Example: button_text="Get it Now". Defaults to Buy Now.
variation_id(Required) The ID of the specific item or size/color you want to sell. Without it the shortcode renders nothing. A product ID also works and uses that product's first variation.
targetDecides where the link opens. Use _self for the same tab or _blank to open the checkout in a new window.
instant_checkoutIf set to yes, the checkout will open in a popup modal. If set to no (the default), it works like a normal link to the checkout page.
classYour own CSS class for the button. It replaces the default button class.

Example Variations ​

  • Link to Checkout for One Item: [fluent_cart_checkout_button variation_id="113" button_text="Go to Checkout" target="_self"]
  • One-Click "Instant" Purchase: [fluent_cart_checkout_button variation_id="113" instant_checkout="yes" button_text="Buy Now"]

3. Add to Cart Button Shortcode ([fluent_cart_add_to_cart_button]) ​

This shortcode puts a simple "Add to Cart" button anywhere you want. Use this if you want customers to stay on the page and keep shopping after they click.

Basic Usage ​

text
[fluent_cart_add_to_cart_button button_text="Add to Cart" variation_id="113"]

Supported Attributes ​

AttributeDescription
button_textThe text displayed on the button (e.g., "Add to Bag", "Grab One"). Defaults to Add to Cart.
variation_id(Required) The ID of the specific option you want added to the cart. Without it nothing renders. A product ID also works.
classYour own CSS class for the button.

4. Mini Cart Shortcode ([fluent_cart_mini_cart]) ​

The Mini Cart shortcode allows you to display a small, convenient cart summary. It is perfect for headers or sidebars, letting customers see how many items they have and the total price at a glance.

Basic Usage ​

text
[fluent_cart_mini_cart cart_icon="bag" show_total_price="true"]

Supported Attributes ​

AttributeDescription
cart_iconChoose the style of your icon. Options: cart (the default), bag, bag-alt. You can also use a custom SVG URL: cart_icon="https://example.com/icon.svg".
show_total_priceShows the current total amount next to the icon. Default true. Set to false to hide the total.
show_item_countDecides when to show the number of items: always (shows even if 0), has_items (only when cart has items, the default), never (hides count).
count_modeWhat the number counts: distinct_products (the default, one per product line) or total_quantity (adds up quantities).
icon_color / price_color / product_count_colorUse hex codes to match your site's branding (e.g., icon_color="#cf2e2e").
button_classAdd a custom CSS class if you want to apply your own specific styling to the cart button.

5. Product Categories Shortcode ([fluent_cart_product_categories]) ​

This shortcode helps your customers browse your store by showing a list or a dropdown of your product categories.

Basic Usage ​

text
[fluent_cart_product_categories display_style="list" show_hierarchy="true"]

Supported Attributes ​

AttributeDescription
display_styleChoose how the categories are presented: list (standard bulleted list, the default) or dropdown (space-saving dropdown menu).
show_hierarchySet to true to show "parent" and "child" categories (indented). Default true.
show_emptySet to true if you want to show categories even if they don't have any products yet. Default false.
show_product_countSet to true to show the number of products next to each category name. Default true.

Use this shortcode to display your store's branding logo anywhere on your site. It allows you to set a custom link and control the size of the image easily.

Basic Usage ​

text
[fluent_cart_store_logo max_width="200"]

Supported Attributes ​

AttributeDescription
logo_url(Optional) A logo image URL. Leave it out to use the store logo from your store settings.
is_linkSet to true (the default) to make the logo clickable (usually linking to your homepage). Set to false for a static image.
link_targetChoose _self (the default) to open in the same tab, or _blank to open the link in a new tab.
max_widthSets the maximum width of the logo in pixels (e.g., "300").
max_heightSets the maximum height of the logo in pixels (e.g., "200").

7. Customer Dashboard Button ([fluent_cart_customer_dashboard_button]) ​

This shortcode adds a button or link to the customer dashboard page, where customers reach their "My Profile" or "My Orders" area (logged-out visitors see the login form there). It is perfect for your site's header or footer menu.

Basic Usage ​

text
[fluent_cart_customer_dashboard_button button_text="My Profile" display_type="link"]

Supported Attributes ​

AttributeDescription
button_textThe text displayed on the link or button (e.g., "Profile"). Defaults to My Account.
display_typeChoose how it looks: link (simple text link) or button (styled button, the default).
show_iconSet to true (the default) to display a small user icon next to the text, or false to hide it.
link_targetChoose _self (same tab, the default) or _blank (new tab).

8. Product Title Shortcode ([fluent_cart_product_title]) ​

This shortcode allows you to display the name of a specific product anywhere on your page. This is extremely useful when building custom landing pages where you want to place the product name separately from the image or description.

Basic Usage ​

text
[fluent_cart_product_title product_id="123" is_link="true"]

Supported Attributes ​

AttributeDescription
product_idThe product to show the title for. Not needed when is_default is true.
is_linkSet to true (the default) to make the title clickable (links to the product page).
link_targetChoose _self (same tab, the default) or _blank (new tab).
is_defaultSet to true to show the product being viewed (for product templates). Default false.

9. Product Image Shortcode ([fluent_cart_product_image]) ​

Similar to the Product Title shortcode, this lets you display the featured image of a specific product. You can use this to create custom layouts by placing the image in one column and the details in another.

Basic Usage ​

text
[fluent_cart_product_image product_id="123"]

Supported Attributes ​

AttributeDescription
product_idThe product to show the image for. Not needed when is_default is true.
is_defaultSet to true to show the image of the product being viewed (for product templates). Default false.

10. On-Page Checkout Shortcode ([fluent_cart_checkout]) ​

The checkout shortcode normally shows the shopper's main cart. Add a list of product variations and it becomes an On-Page Checkout Form, where shoppers pick from the products you choose and pay on the same page. This feature requires FluentCart Pro.

Basic Usage ​

text
[fluent_cart_checkout variant_ids="185,186,187" selection_mode="single" selector_label="Choose your plan"]

Supported Attributes ​

AttributeDescription
variant_ids(Required for this mode) A comma-separated list of the variation IDs to offer, up to 20.
selection_modesingle shows radio buttons (the default). multiple shows checkboxes.
max_itemsWith multiple, the most options a shopper can tick at once, from 1 to 20. Default 5.
selector_labelThe heading shown above the list of options.
field_label_styleSets how checkout fields show their name once the customer has typed in them: docked (the default), floating, or placeholder. It works with or without variant_ids.

11. Currency Switcher Shortcode ([fluent_cart_currency_switcher]) ​

Shows a button that lets customers pick the currency they want to see prices in. It appears only when Multi Currency is on with at least two currencies, and renders nothing otherwise. Multi Currency requires FluentCart Pro.

Basic Usage ​

text
[fluent_cart_currency_switcher display="flag" list_display="name"]

Supported Attributes ​

The attributes starting with list_ control the list that opens when the button is clicked. The others control the button.

AttributeDescription
displayWhat the button shows: name_code, name, code, symbol, or flag. Leave it out to show the code with the sign, for example USD $.
symbolyes adds the currency sign to the button label, and no removes it.
flagno hides the flag on the button. The flag shows by default.
flag_positionleft (the default) or right. Where the flag sits on the button.
list_displayWhat each row in the list shows: name_code (the default), name, code, symbol, or flag.
list_symbolyes adds the currency sign to each row. The list has no sign by default.
list_flagno hides the flag in each row.
list_flag_positionleft (the default) or right. Where the flag sits in each row.

The same switcher is also available as a block, and as a menu item. See Adding a Currency Switcher for what each value looks like and for ready-made combinations.


12. More Shortcodes ​

FluentCart registers a few more shortcodes. Most of them power the store pages you assign under Pages Setup, and you rarely need to place them by hand:

ShortcodeWhat it shows
[fluent_cart_product_card]A single product card, like one item from the product grid.
[fluent_cart_single_product]A full single product layout.
[fluent_cart_pricing_table]A pricing table for comparing product plans.
[fluent_products_search_bar]A product search bar.
[fluent_cart_cart]The cart page.
[fluent_cart_customer_profile]The customer dashboard page.
[fluent_cart_receipt]The order receipt (thank you) page.
[fluent_cart_order_review]The "review your order" page.
[fluent_cart_product_reviews]A product's reviews. See the reviews shortcode for its options.
[fluent_cart_product_header]The top section of a single product page.
[fluent_cart_related_products]Products related to the one being viewed.
[fluent_cart_checkout_shipping_methods]The shipping method choices on the checkout.

How to Implement ​

  1. Copy the code: Select the shortcode configuration that fits your needs.
  2. Paste into WordPress: Open any Page or Post in the Block Editor.
  3. Use a Shortcode Block: Add a Shortcode block and paste the code.
  4. Publish: Update your page to see your custom product grid in action.

Tip: Use the per_page attribute to create small "Featured Products" sections on your homepage by setting it to a low number like 3 or 4.