Every block, shortcode and link, in one place
A reference for placing Allspice elements exactly where you want them.
On this page
Overview
The Allspice plugin adds blocks to the WordPress editor, plus shortcodes for places blocks can't go: the classic editor, theme templates, page builders, and widget areas.
You don't need any of these for the standard setup, because the plugin places the widget and rail automatically. Use them when you want a specific element in a specific spot.
Where a block and a shortcode do the same job, prefer the block. It previews in the editor, and it will not be left behind as visible text if the plugin is ever deactivated.
Blocks
Search for “Allspice” in the block inserter, or type /allspice in the editor. Every block name starts with “Allspice”.
| Block | What it places |
|---|---|
| Floating Button | The floating Allspice launcher, on the post it's placed in. Overlay style only: it renders nothing when either device uses the Floating or Inline style. |
| Rail | The classic Allspice rail, with its suggested-question bubbles. Overlay style only, like the Floating Button; the Floating and Inline styles use the adaptive rail instead. |
| Inline overview, style 1 & 2 | Two visual treatments of the recipe overview block. |
| Inline cooking CTA | A call to action that opens guided cooking for the recipe on the page. |
| Inline save recipe form | A save-this-recipe prompt, inline in the post. |
| Inline newsletter form | A newsletter signup that feeds your connected email provider. |
| Meal Plans | Your meal plan products, purchasable in place. Set an optional heading and subtitle in the block settings. |
| Meal Plan Feature | A sales section for one meal plan. Paste the plan's Product ID from the Publisher Portal into the block settings. The headline, description, and button label default to the plan's own name, description, and “View this plan”; you can override each, and turn the price and plan facts (days, meals) on or off. With no Product ID, the block shows nothing on your site. |
| Membership CTA | A membership call to action with your live pricing and benefits. Renders on the server, so it is present for crawlers. |
Shortcodes
Paste these anywhere shortcodes run. Shortcodes render nothing while the front end is turned off in Settings → Allspice → Status & Debug.
| Shortcode | What it places |
|---|---|
[allspice_button] | A button from your Button library. [Allspice_Button], the form the Publisher Portal copies, does the same thing. |
[allspice_floating_button] | The floating launcher. Overlay style only, like the Floating Button block. |
[allspice_inline_chat] | Pico chat, inline in the content. |
[allspice_inline_search] | A search box inline in the content. |
[allspice_search] | The full search experience. This is what the Advanced Search page uses. |
[allspice_inline_cooking_cta] | The guided-cooking call to action. |
[allspice_inline_overview_style_one] | Recipe overview, first style. |
[allspice_inline_overview_style_two] | Recipe overview, second style. |
[allspice_membership] | The membership landing content. Kept working for pages generated by earlier plugin versions; new membership pages use editable blocks instead. |
Shortcode attributes
All attributes are optional. Sizes are in pixels.
[allspice_button]
| Attribute | What it does |
|---|---|
id | The button ID from your Button library, for example WIDCON-t7ab. Required: without it the shortcode renders nothing. |
reserve_w, reserve_h | Space held for the button while it loads, so the page doesn't shift. Premade buttons fill in their own defaults if you leave these out. |
class | Extra CSS class on the button's slot. |
flow | 1 makes the slot full width (capped at reserve_w) and centered, instead of a fixed-size inline box. |
[allspice_floating_button] also takes id, reserve_w, and reserve_h, plus:
| Attribute | What it does |
|---|---|
offset_right, offset_bottom | Distance from the right and bottom of the screen. Default 20 each. |
z | The launcher's z-index. Default 9000. |
Inline shortcodes ([allspice_inline_chat], [allspice_inline_search], [allspice_inline_cooking_cta], and the two overview shortcodes) take id, reserve_w, and reserve_h. All but [allspice_inline_chat] also take class, an extra CSS class on the wrapper. The cooking CTA and overview shortcodes also take pad_top and pad_bottom: space above and below, 0 to 200, default 16. The matching blocks have the same spacing settings.
Link hashes
Often you do not need a block at all - you need an ordinary link that opens Allspice. Use these as the href on any button, menu item, or email link. The plugin opens the right screen in place, without loading a new page.
| Link | Opens | Works |
|---|---|---|
#allspice-membership | Membership signup and pricing | Any page |
#allspice-login | Sign-in | Any page |
#allspice-account | The reader's account and billing | Any page |
#allspice-search | Search. Accepts a query: #allspice-search?q=chicken | Any page |
#allspice-mealplans | The meal plan store | Any page |
#allspice-recipe | The Allspice widget for this recipe | Recipe pages only |
#allspice-save | Save this recipe | Recipe pages only |
#allspice-groceries | Add this recipe to groceries | Recipe pages only |
#allspice-guided-cooking | Guided cooking for this recipe | Recipe pages only |
The recipe-page links act on the recipe being viewed, so they do nothing on a page with no recipe. The other five work anywhere the plugin is active.
You can also deep-link a specific meal plan product by appending its id: #allspice-mealplans-prod_XXXX. The portal gives you the full link for email campaigns.
Troubleshooting
A shortcode is showing as text on the page
The plugin is inactive, or the shortcode name is misspelled. Check the spelling against the table above. ([allspice_button] and [Allspice_Button] both work; other shortcodes are lowercase only.)
A block renders in the editor but not on the site
Check these in order:
- The Floating Button and Rail blocks (and
[allspice_floating_button]) render nothing when either device uses the Floating or Inline widget style. That's expected. - The front end is turned off in Settings → Allspice → Status & Debug.
- A JavaScript optimization plugin is delaying Allspice. See Plugin compatibility for the exclusions to add.
A recipe-scoped element does nothing
Confirm the page has a recipe Allspice can parse. See Recipe parsing.
A link hash does nothing
- Confirm the plugin is active on that domain
- Check it against the table above - some routes are recipe-page only