Use [steuard_rating] to put your current Google rating and review count into text: a sentence in page copy, a hero line such as "Rated 4.4 out of 5 by our guests", or a plain-text file such as llms.txt. The number comes from the same review data the reviews display uses, so it updates itself instead of being typed by hand and going stale.
The output is plain text with no markup, so it is safe inside a paragraph, a heading, or a text file. It is display text only; it adds no structured data to the page.
Attributes #
| Attribute | Values and default | Effect |
|---|---|---|
connection |
A Review post's numeric ID; the site's only published Review post by default | Selects the review connection. A site with more than one published Review post must set it, or the shortcode prints the fallback. Copy the ID from the Review post's Shortcode tab. |
format |
sentence (default), rating, count, or json |
sentence prints "4.4 out of 5 from 125 Google reviews". rating prints only the average, count only the review count, and json a small machine-readable object: {"rating":4.4,"count":125,"scale":5,"source":"Google"}. |
decimals |
0 to 3; 1 by default |
Decimal places on the rating. The count is never rounded. |
fallback |
Any text; empty by default | Printed instead of the number when no rating is available: the connection is not set up, Google could not be reached and no earlier copy exists, or the business has no reviews yet. Without a fallback the shortcode prints nothing. |
Which connection it uses #
The rating always comes from one Review post under Steuard → Reviews; there is no site-wide number separate from a connection.
- With
connection="123", it uses that Review post. Copy the ID from the post's Shortcode tab rather than typing it. - Without the attribute, it uses the site's only published Review post, so a single-location site never needs the ID.
- With two or more published Review posts and no attribute, it prints the fallback (or nothing) rather than guess a location. This is stricter than
[steuard_reviews], which shows the oldest connection by default, because a wrong number in text is worse than none.
Draft Review posts are not considered, the same way drafting a Review post takes its reviews off the site.
The shortcode never prints a zero rating, a zero count, or a partial sentence. When it has no usable data it prints the fallback or nothing at all, so write the surrounding sentence to read correctly either way, or set a fallback.
Examples #
With one Review post on the site:
Currently [steuard_rating] on Google.
For a specific connection, with a fallback for the moment the rating is unavailable:
[steuard_rating connection="123" fallback="rated on Google"]
Just the average, to two decimals:
Rated [steuard_rating format="rating" decimals="2"] by our guests
How current the number is #
The rating is as current as Steuard's daily review refresh, so it can be up to about a day behind Google. Describe it as "current" rather than "live". A page cache in front of the site can add its own delay; Google Places connections are always fetched live and are never page-cached.
For the reviews display itself, see Displaying Google Reviews and the Steuard Reviews Shortcode Reference.