Shortcode & Block
Two ways to put a recommendation exactly where you want it, including places WooCommerce has no hook for, and block themes where its hooks may not run.
The built-in locations cover WooCommerce's standard pages. When you want a recommendation somewhere else, such as a landing page, a custom template, or halfway down a long product description, you use a custom placement.
Both options are in the free plugin, and both are coordinated by the Recommendation Manager like every other placement.
The shortcode
[shapedrecommend id="123"]There's one attribute, id: the number of the recommendation you want to show.
Setting it up
- In the Setup step, set Position On Page to Custom placement · Shortcode.
- Save the recommendation. Until you do, the builder says "Save this recommendation once and its shortcode appears here."
- Under Paste this shortcode anywhere, click Copy. You'll see "Shortcode copied".
- Paste it anywhere shortcodes work: a page, a post, a widget, or a page builder's shortcode element.
Step 1 matters. The shortcode only shows a recommendation whose location is Custom placement · Shortcode. Paste the shortcode of a recommendation that's set to, say, Product page · After tabs, and it shows nothing.
Where you can use it
Anywhere WordPress runs shortcodes. That includes most page builders: Elementor, Divi, Bricks, Beaver Builder and WPBakery all have a shortcode or text element.
What it shows
The shortcode doesn't decide anything on its own. It shows whatever the Recommendation Manager approved for that recommendation on this page.
So if the recommendation was held back for this shopper (a limit was already reached, a display condition wasn't met, or all its products were already shown above it), the shortcode shows nothing. Being in a different part of the page doesn't get it round the rules.
Context still applies
The recommendation's context decides what it can read. A Product recommendation needs a product page to know which product it's next to; a Cart recommendation needs a cart. Choose the context that matches where you're pasting it. A recommendation with the Anywhere context Pro shows best-sellers and works on any page. Anywhere recommendations can only be placed with the shortcode.
The editor block
In the block editor, click + and search for Shaped Recommend. It's in the WooCommerce category.
Setting it up
- In the Setup step, set Position On Page to Custom placement · Block.
- Save the recommendation.
- Open the page or template in the editor, add the Shaped Recommend block, and pick your recommendation from its dropdown. The builder gives you the same instructions: "In any page or post, click + and search for the Shaped Recommend block, then pick a recommendation from its dropdown."
As with the shortcode, the block only shows a recommendation whose location is Custom placement · Block.
Block settings
There are two, on purpose:
| Setting | What it does |
|---|---|
| Recommendation | Which recommendation to show here. Inactive ones are marked in the list. |
| Display | As configured, Grid or Inline list. "Grid and list are two layouts of the same products. Everything else about this recommendation is configured in Shaped Recommend." |
The Display switch only swaps between grid and inline list. If the recommendation uses a bundle box or a single-offer card, it keeps that display.
That's the whole settings panel. You don't configure recommendations in the editor. Filters, sorting, display conditions and limits all live in the plugin's own screens. The block only decides which recommendation appears here.
It works in the Site Editor too
That's the point of it. Add it to a product template, a cart template, a header or footer, or any template part in a block theme.
Preview in the editor
The block shows a real preview on the editor canvas, built by the same code as the storefront, so you can see what you're placing before you publish. If the recommendation isn't set to Custom placement · Block (or isn't saved yet), the preview says so instead.
Why the block is in the free plugin
On a block theme, the block isn't just convenient. It can be the only reliable way to show a recommendation at all.
Classic themes run WooCommerce's PHP hooks, such as woocommerce_after_single_product_summary, and that's how the standard locations attach. A block theme builds its pages from blocks, and some of those hooks never run. See Locations.
So the block is free for everyone. A store on a block theme is never asked to pay just to make recommendations show.
Shortcode or block?
| Shortcode | Block | |
|---|---|---|
| Classic editor and page builders | Yes | No |
| Block editor | Works | Yes, and better |
| Site Editor and block themes | No | Yes |
| Preview while editing | No | Yes |
| Switch grid and list per placement | No | Yes |
| Anywhere context Pro | Yes | No |
Rule of thumb: use the block in the block editor or Site Editor, and the shortcode everywhere else.
Using it in more than one place
You can paste the same shortcode or block on several pages. Each one shows the same recommendation and follows the same page limits. If two copies end up on one page, they count as two blocks.
If you want different behaviour in different places (a different heading, display or display conditions), create a second recommendation. Each recommendation has exactly one placement.
Troubleshooting
Nothing shows. Check that the recommendation is Active and that its Position On Page is the matching custom placement. Then open the builder and check the Live Preview isn't empty. If the preview has products but the page doesn't, something held it back. Work through Why isn't my block showing?
The shortcode text appears on the page as plain text. Something is outputting the content without running shortcodes. This is common in page builders' raw-HTML elements. Use a shortcode element instead, or use the block.
It shows on some pages and not others. It's almost always the blocks-per-page limit or No repeated products. Both are working as intended, and both can be adjusted.
Next
- Locations: the built-in spots.
- Setup step
- Recommendation Manager: why a custom placement can still be held back.