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: 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.

Collection Shortcode

Display products from a specific collection with full control over display options.
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.

Add to Cart Shortcode

A standalone add-to-cart button for embedding anywhere on your site.

Cart Shortcode

Cart Icon Shortcode

A small cart icon with item count badge, ideal for navigation menus or headers.

Account Shortcode

Form Shortcode

Display a form created in your Marzipan dashboard.

Checkout Shortcode

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:

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)