Skip to main content
The Marzipan for WordPress plugin integrates Marzipan’s web components directly into your WordPress site, providing Gutenberg blocks, Elementor widgets, and shortcodes for displaying products, carts, and subscription management.

Requirements

  • WordPress 6.0 or higher
  • PHP 7.4 or higher
  • A Marzipan account with API access

Installation

  1. Download the plugin from your Marzipan dashboard
  2. Upload the marzipan-for-wordpress folder to /wp-content/plugins/
  3. Activate the plugin through the Plugins menu in WordPress
  4. Navigate to Settings > Marzipan to configure
Activating the Marzipan plugin in WordPress

Configuration

After activation, go to Settings > Marzipan to enter your API token.

Getting Your API Token

  1. Log into your Marzipan dashboard
  2. Navigate to Settings > API
  3. Create an API token
Marzipan API token

Settings Page

The settings page displays:
  • API Token - Your Marzipan API token (required)
  • Pages - Links to view and edit the auto-generated pages
Entering your API token

Auto-Generated Pages

On activation, the plugin automatically creates six pages with locked Gutenberg blocks:
PageURLPurpose
Store/storeProduct collection display
Product/productIndividual product detail template
Cart/cartShopping cart
Checkout/checkoutCheckout form
Account/accountCustomer account management
Contact/contactContact form
These pages contain locked blocks that cannot be accidentally deleted, ensuring your store functions correctly.
Auto-generated pages in WordPress

Gutenberg Blocks

The plugin provides 9 Gutenberg blocks in the Marzipan category:

Collection Block

Display products from a specific collection with filtering options.
Collection block in Gutenberg editor

Product Block

Display a single product with configurable view modes (mini or full).

Product Page Block

Full product detail page template with all product information.

Add to Cart Block

A dedicated add-to-cart button with quantity options.

Cart Block

Shopping cart displaying line items and totals.

Checkout Block

Complete checkout form for processing orders.

Account Block

Customer account portal for managing subscriptions and orders.

Form Block

Dynamic form that renders a form created in your Marzipan dashboard. Select the form by slug in the block settings.

Cart Icon Block

Cart icon with item count badge, perfect for navigation menus.
All Marzipan blocks in the block inserter

Elementor Widgets

If you use Elementor, the plugin provides 7 widgets:
  • Product
  • Collection
  • Add to Cart
  • Cart
  • Account
  • Form
  • Cart Icon
Find them in the Elementor widget panel under the Marzipan category.
Marzipan widgets in Elementor
They can be easily dragged and dropped into any Elementor layout and then configured via the widget settings.
Marzipan widgets in Elementor

Shortcodes

For use in the classic editor, template files, or anywhere WordPress shortcodes are supported. Shortcodes accept the same settings as the web component props, using underscores instead of hyphens.
ShortcodeDescription
[marzipan_collection]Display a product collection
[marzipan_product]Display a single product
[marzipan_addtocart]Add to cart button
[marzipan_cart]Shopping cart
[marzipan_checkout]Checkout form
[marzipan_product_page]Full product page
[marzipan_account]Customer account portal
[marzipan_form]Dynamic form
[marzipan_carticon]Cart icon with count

Collection Shortcode

Display products from a specific collection with full control over display options.
[marzipan_collection
  collection="red-wines"
  show_description="true"
  show_subscriber_pricing="true"
  placeholder_items="12"
  add_to_cart_text="Buy Now"
  redirect_to_cart="false"
]
AttributeDescriptionDefault
collectionCollection slug (required)
show_collection_nameShow the collection titletrue
show_descriptionShow product descriptionsdefault
show_more_linkShow “view more” link on productsfalse
show_more_textText for the “view more” linkMore
placeholder_itemsNumber of loading placeholders8
hide_add_to_cart_buttonHide the add to cart buttonfalse
show_cart_quantityShow quantity selectordefault
redirect_to_cartRedirect to cart after addingdefault
add_to_cart_textCustom button textAdd to Cart
show_subscriber_pricingShow member pricingdefault
sale_badge_textText for sale badgesSale
subscriber_badge_textText for subscriber badgesSubscribers
subscriber_price_labelLabel for subscriber pricingfor subscribers
bundle_textUnit text for bundlesbundle
Attributes set to default will use the value configured in your web component settings.

Product Shortcode

Display a single product in either mini (card) or full (page) view.
[marzipan_product product="reserve-cabernet" view="full"]
AttributeDescriptionDefault
productProduct slug or ID (required)
viewDisplay mode: mini or fullmini
show_collection_nameShow the collection nametrue
show_subscriber_pricingShow member pricingdefault
hide_add_to_cart_buttonHide the add to cart buttonfalse
redirect_to_cartRedirect to cart after addingfalse
add_to_cart_textCustom button textAdd to Cart
sale_badge_textText for sale badgesSale
subscriber_badge_textText for subscriber badgesSubscribers

Add to Cart Shortcode

A standalone add-to-cart button for embedding anywhere on your site.
[marzipan_addtocart
  product_id="550e8400-e29b-41d4-a716-446655440000"
  product_type="physical"
  button_text="Add to Cart"
  show_quantity="true"
]
AttributeDescriptionDefault
product_idProduct UUID (required)
product_typephysical, bundle, event, or subscriptionphysical
button_textCustom button textAdd to Cart
show_quantityShow quantity selectorfalse
quantityDefault quantity1
redirectRedirect to cart after addingfalse
availabilityall or subscribersall
out_of_stockShow as out of stockfalse
disabledDisable the buttonfalse

Cart Shortcode

[marzipan_cart empty_cart_message="Your cart is empty — browse our wines!"]
AttributeDescriptionDefault
empty_cart_messageCustom empty cart messageYou have nothing in your cart.

Cart Icon Shortcode

A small cart icon with item count badge, ideal for navigation menus or headers.
[marzipan_carticon icon_style="bag-outline" cart_path="/cart"]
AttributeDescriptionDefault
cart_pathPath to the cart page/cart
icon_stylecart-outline, cart-solid, bag-outline, or bag-solidbag-outline

Account Shortcode

[marzipan_account disable_pick_mix_subscription_edit="false"]
AttributeDescriptionDefault
disable_pick_mix_subscription_editPrevent customers from editing pick & mix selectionsfalse

Form Shortcode

Display a form created in your Marzipan dashboard.
[marzipan_form slug="contact-us"]
AttributeDescriptionDefault
slugForm slug as defined in your dashboard (required)
button_textCustom submit button textSubmit
success_messageCustom success messageForm setting

Checkout Shortcode

[marzipan_checkout]
No attributes are required for the checkout shortcode.

Product URLs

Product detail pages are automatically accessible at /store/{product-slug}. The plugin handles URL rewriting so visitors see the full product page when navigating to a product. For example, if you have a product with the slug reserve-cabernet, it will be accessible at:
https://yoursite.com/store/reserve-cabernet

SEO Integration

The plugin integrates with popular SEO plugins to ensure proper canonical URL handling on product pages:
  • Yoast SEO
  • RankMath
  • SEOPress
  • All in One SEO

Theme Compatibility

The plugin works with any WordPress theme. All auto-generated pages use your active theme’s templates, headers, and footers.
If you use a caching plugin, you may need to exclude the cart and checkout pages from caching to ensure real-time cart updates.

Troubleshooting

Pages Not Displaying Correctly

If a page was accidentally deleted, you can recreate it from the Settings > Marzipan page. Click the Create button next to the missing page.
Recreating a missing page

Products Not Loading

Verify that:
  1. Your API token is entered correctly
  2. Your Marzipan account is active
  3. You have products configured in your Marzipan dashboard

Styling the Components

See the Styling guide for customizing the appearance of components to match your branding.

Uninstalling

When the plugin is uninstalled:
  • The API token setting is removed
  • Rewrite rules are flushed
  • Created pages are not automatically deleted (you can remove them manually if desired)