1. Home
  2. Trustie Free
  3. Using Trustie
  4. Shortcode Reference

Shortcode Reference

Shortcodes are how you tell Trustie where to display things on your site. They’re the building blocks that let you put reviews, ratings, testimonials, and forms exactly where you want them.

What’s a Shortcode?

A shortcode is a little tag wrapped in square brackets — like [trustie_reviews] — that you paste into your page content. WordPress sees that tag and replaces it with something useful: a review list, a star rating, a testimonial grid, a submission form.

Think of shortcodes like placeholders. You put the placeholder where you want the content to appear, and WordPress fills it in with the real thing.

Where to Put Shortcodes

You can use shortcodes in:

  • Pages and posts — paste the shortcode directly into the content area
  • Block editor (Gutenberg) — add a Shortcode block, then paste the shortcode inside it
  • Page builders (Elementor, Divi, Beaver Builder, etc.) — use their “Shortcode” or “Text” element
  • Widgets — paste into a Text or Custom HTML widget in Appearance > Widgets

If a shortcode shows up as plain text on your page instead of displaying reviews, you’re probably pasting it into the wrong block type. Look for a block or element specifically labelled Shortcode.

Customising Shortcodes

Most shortcodes accept optional settings (called attributes) that let you change their behaviour:

[trustie_reviews product_id="42" limit="5"]

In this example, product_id="42" tells the shortcode which product’s reviews to show, and limit="5" tells it to show 5 reviews instead of the default 10. Each shortcode below lists what you can customise.

Product Reviews

These shortcodes require WooCommerce. If you don’t have WooCommerce installed, skip ahead to Testimonials or Google Reviews.

[trustie_reviews] — Display Product Reviews

This is your workhorse shortcode. It shows reviews for a specific product with ratings, review text, and author information.

[trustie_reviews product_id="42"]

What you can customise:

SettingWhat It DoesDefault
product_idWhich product’s reviews to showCurrent product (if on a product page)
limitHow many reviews to display10
show_summaryShow average rating and breakdown?true
orderNewest first (DESC) or oldest first (ASC)DESC

Examples:

Reviews without the summary bar:

[trustie_reviews product_id="42" show_summary="false"]

> Where’s the review form? Use [trustie_review_form] to display the review submission form. It works as a separate shortcode so you can place it exactly where you want — below the reviews list, in a sidebar, or on its own page. See the review form shortcode below.

[trustie_all_reviews] — Reviews from All Products

Want a dedicated page showing feedback from across your entire store? This shortcode pulls in reviews from every product and displays them in a grid.

[trustie_all_reviews]

What you can customise:

SettingWhat It DoesDefault
limitHow many reviews to show12
columnsGrid columns (1–4)3
min_ratingOnly show reviews at or above this rating1 (show all)
show_productDisplay which product each review is for?true
orderNewest (DESC) or oldest (ASC) firstDESC

Examples:

Two-column layout with 20 reviews:

[trustie_all_reviews limit="20" columns="2"]

Only 4-star and above:

[trustie_all_reviews min_rating="4"]

[trustie_reviews_page] — Full Reviews Page

This is the all-in-one shortcode for creating a complete reviews page. It includes pagination, summary statistics, and a clean grid layout — everything you need for a dedicated “/reviews” page.

[trustie_reviews_page]

What you can customise:

SettingWhat It DoesDefault
per_pageReviews per page before pagination kicks in12
columnsGrid columns (1–4)3

Why use this instead of [trustie_all_reviews]? This shortcode adds pagination so visitors can browse through all your reviews without loading everything at once. It’s designed for pages where reviews are the main content.

Setting it up:

  1. Create a new page in WordPress (call it “Reviews” or whatever you like)
  2. Add the shortcode [trustie_reviews_page] as the page content
  3. Optionally, go to Trustie > Settings > Layout and select this page as your designated reviews page — this tells Trustie to link to it from the floating widget

If you don’t have WooCommerce installed, Trustie automatically creates a /reviews/ URL on your site that displays this shortcode’s output.

[trustie_review_form] — The Review Form by Itself

Sometimes you want the review submission form on its own, without listing existing reviews. Handy for “Leave a Review” pages or pop-up forms.

[trustie_review_form product_id="42"]
SettingWhat It DoesDefault
product_idWhich product this review is forRequired

Note: The product_id is required here since there are no surrounding reviews to give context about which product is being reviewed.

Star Ratings

[trustie_rating] — Show Average Rating

Display the average star rating for a product. Great for hero sections, comparison tables, or anywhere you want quick credibility.

[trustie_rating product_id="42"]

What you can customise:

SettingWhat It DoesDefault
product_idWhich productCurrent product
show_countShow “(42 reviews)” after the stars?true
linkLink the stars to the reviews section?true

Examples:

Stars without the count:

[trustie_rating product_id="42" show_count="false"]

Stars that don’t link anywhere:

[trustie_rating product_id="42" link="false"]

[trustie_loop_stars] — Lightweight Stars for Product Listings

This is the fast version, optimised for product archives and category pages where you might be showing dozens of products at once. It loads quicker because it skips some of the extras.

[trustie_loop_stars]
SettingWhat It DoesDefault
product_idWhich productCurrent product
show_countInclude review count?false
sizeStar size in pixels14

Example:

Slightly larger stars with the count:

[trustie_loop_stars size="16" show_count="true"]

Testimonials

Testimonials work without WooCommerce — they’re about your business as a whole, not specific products. Think of them as the kind of quotes you’d put on your homepage or about page.

[trustie_testimonials] — Display Testimonials

Show approved testimonials in a grid or list layout.

[trustie_testimonials]

What you can customise:

SettingWhat It DoesDefault
limitHow many testimonials to show10
columnsGrid columns (1–4)2
layoutDisplay layout: grid, list, or masonryFollows the Testimonials Layout setting at Trustie > Settings > Layout (falls back to grid if not set)
show_ratingShow star rating (if the customer gave one)?true
show_photoShow customer photo (if they uploaded one)?true

Examples:

Three-column grid with 6 testimonials:

[trustie_testimonials limit="6" columns="3"]

List layout without ratings:

[trustie_testimonials layout="list" show_rating="false"]

The Three Layouts

  • Grid: Evenly-spaced cards in rows and columns — clean and structured
  • List: Single-column layout, one testimonial after another — great for longer quotes
  • Masonry: Cards of different heights arranged to fill space efficiently — like a Pinterest board

[trustie_testimonial_form] — Collect Testimonials

Let customers share their experience with your business through a clean submission form.

[trustie_testimonial_form]
SettingWhat It DoesDefault
titleHeading above the form“Share Your Experience”
show_ratingInclude a star rating field?true
show_photoAllow photo uploads?false
show_companyShow the company name field?true
redirectURL to go to after submission(stays on page with success message)

Examples:

Custom heading with photo uploads enabled:

[trustie_testimonial_form title="Tell Us What You Think" show_photo="true"]

Redirect to a thank-you page after submission:

[trustie_testimonial_form redirect="/thank-you"]

What happens after someone submits? By default, testimonials wait for your approval before appearing on your site. You can review them in Trustie > Testimonials in your WordPress admin. If you’ve enabled auto-approve (in settings), testimonials above your rating threshold publish immediately.

[trustie_testimonial_slider] — Testimonial Carousel

A sliding carousel that auto-advances through testimonials. Great for homepage hero sections or sidebar widgets where space is limited.

[trustie_testimonial_slider]
SettingWhat It DoesDefault
limitHow many testimonials to include10
autoplayAuto-advance through slides?yes
speedTime between slides in milliseconds5000 (5 seconds)
arrowsShow previous/next arrows?yes
dotsShow navigation dots below?yes
show_ratingShow star ratings?true
show_photoShow customer photos?true

Examples:

Slow carousel with no dots:

[trustie_testimonial_slider speed="8000" dots="no"]

Manual-only (no autoplay):

[trustie_testimonial_slider autoplay="no"]

[trustie_testimonial_grid] — Testimonial Grid

A dedicated grid layout shortcode — it’s a convenience wrapper around [trustie_testimonials] with the grid layout pre-set.

[trustie_testimonial_grid]
SettingWhat It DoesDefault
limitHow many testimonials to show10
columnsGrid columns (1–4)3
show_ratingShow star ratings?true
show_photoShow customer photos?true

Example:

Four-column grid of 8 testimonials:

[trustie_testimonial_grid limit="8" columns="4"]

Google Reviews

[trustie_google_reviews] — Display Google Business Reviews

Show reviews from your Google Business Profile right on your website. This requires setting up your Google Place ID and API key first — see our Google Reviews guide.

[trustie_google_reviews]

This shortcode displays:

  • Your Google business name and overall rating
  • Individual reviews with star ratings, author names, and review text
  • A “View on Google” button linking to your Google Business Profile
  • Special behind-the-scenes code that tells search engines about your reviews — this can make star ratings appear directly in Google search results

Note: Google’s API returns a maximum of 5 reviews. Your aggregate rating (the overall star rating and total review count) reflects all your Google reviews, but the individual reviews shown are limited to the 5 most recent.

Before this shortcode works, you need to:

  1. Have a Google Business Profile
  2. Set up a Google API key with the Places API enabled
  3. Enter your Place ID and API key in Trustie > Settings > Google Reviews

Full setup instructions: Connecting Google Reviews

Using Shortcodes in Page Builders

All of these shortcodes work in popular page builders. Here’s where to put them:

  • Gutenberg (Block Editor): Add a Shortcode block
  • Elementor: Use the Shortcode widget
  • Divi: Use the Code module
  • WPBakery: Use Raw HTML or Text Block
  • Beaver Builder: Use the HTML module

Paste the shortcode text into the appropriate block/widget, save, and preview your page.

Using Shortcodes in PHP Templates

If you’re a developer and need to use shortcodes directly in theme templates:

<?php echo do_shortcode( '[trustie_rating product_id="42"]' ); ?>

Performance Tips

Shortcodes are lightweight, but here are some tips if you’re using several on one page:

  1. Use trustie_loop_stars in product archives — it’s optimised for displaying many products at once
  2. Set reasonable limits — showing 10 reviews is better than loading 100 if visitors won’t scroll that far
  3. Use a caching plugin — Trustie works beautifully with caching plugins like WP Super Cache or W3 Total Cache
  4. Turn off unused features — head to Tracksies > Settings > Features and disable anything you’re not using. Think of it like unplugging appliances you don’t use — your site runs a bit leaner

Quick Copy Reference

Here are the most common shortcodes, ready to copy and paste:

Product reviews:

[trustie_reviews product_id="YOUR_ID"]

Full reviews page:

[trustie_reviews_page]

Star rating:

[trustie_rating product_id="YOUR_ID"]

Google reviews:

[trustie_google_reviews]

Testimonials grid:

[trustie_testimonials columns="3" limit="6"]

Testimonial carousel:

[trustie_testimonial_slider]

Testimonial form:

[trustie_testimonial_form]

Replace YOUR_ID with your actual product ID. You can find it in the URL when editing a product — look for post=123.

How can we help?