Automatic placements inject badge sets at predefined WordPress and e-commerce hooks — no block or shortcode needed on those pages.
Configuration
On each badge set: Placement tab → Automatic placements (multi-select dropdown).
- Leave empty → badge set appears only via block or shortcode.
- Select one or more placements → badge set renders automatically on matching pages.
- Options are grouped by plugin (Site, WooCommerce, EDD, etc.). Options stay disabled until the required plugin is installed.
Automatic placements are per badge set, not global. (Legacy global placement values in the database may still apply at runtime, but there is no settings UI for them.)
Optional filters (Placement tab)
| Filter | Applies to | Behavior |
|---|---|---|
| Product categories | WooCommerce product/shop placements | Empty = all categories; ancestor terms match |
| Product tags | WooCommerce product/shop placements | Empty = all tags |
| Specific pages | specific_page placement only | Enabled when that placement is checked |
| Custom page paths | custom_page placement only | One path per line, e.g. /pricing |
How badge sets are resolved
For each placement hook, Trustbadg picks one badge set in this order:
- Filter override —
trustbadg_resolve_badge_set_id(includes WooCommerce per-product override via_trustbadg_badge_set) - First matching badge set — published sets with that placement enabled, passing taxonomy/page filters (sorted by title, ascending)
- Default badge set — Trustbadg → Settings → Badges (skipped for
specific_pageandcustom_page)
Tip: Use separate badge sets per placement when messaging differs. If two sets share the same placement, only the first (alphabetically by title) renders.
Available placements
Site
| ID | Location |
|---|---|
before_content | Above main content on posts and pages |
after_content | Below main content on posts and pages |
homepage | Below content on the homepage |
all_pages | Below content on every page |
blog_posts | Below content on every blog post |
specific_page | Selected pages only (per-set; use Specific pages filter) |
custom_page | URLs matching custom paths (per-set; use Custom page paths) |
site_footer | Site-wide, above closing </body> |
WooCommerce
| ID | Location |
|---|---|
woocommerce_product_title | After product title |
woocommerce_product_price | After product price |
woocommerce_product_cta | Next to Add to Cart |
woocommerce_product | Below purchase form |
woocommerce_product_category | Above product grid on category archives |
woocommerce_shop | Above product grid on shop page |
woocommerce_cart | Below cart table |
woocommerce_cart_totals | Below cart totals |
woocommerce_checkout_before | Above checkout fields |
woocommerce_checkout | Above payment methods |
woocommerce_checkout_after_payment | Below payment methods |
woocommerce_thankyou | Order received page |
Classic and block-based WooCommerce cart/checkout themes are supported.
Other e-commerce plugins
| Plugin | Placements |
|---|---|
| EDD | Download price, purchase button, below content, checkout, receipt |
| SureCart | Buy page, checkout (also instant buy URLs with ?sc-buy) |
| FluentCart | Product summary, cart, checkout |
| MemberPress | Checkout form, before submit |
| Restrict Content Pro | Registration fields, before submit |
| Paid Memberships Pro | After level cost, before submit |
| GiveWP | Before donation amounts, before donate button |
WooCommerce product override
On individual products, a Trustbadg Badge Set meta box lets you assign a specific badge set. That overrides automatic resolution on that product page via the trustbadg_resolve_badge_set_id filter.
