Contents

Gutenberg Block — Plugixa Recipe

Plugixa Recipe registers a Plugixa Recipe Gutenberg block that is a visual wrapper around the [plugixarecipe] shortcode — with live preview in the editor.

Inserting the block

In the block editor, click + and search for Plugixa Recipe. The block is registered server-side via includes/blocks/class-recipe-block.php using the WordPress block.json API — meaning it appears in the block library automatically once the plugin is active.

Block sidebar controls

With the block selected, the right sidebar shows:

Control Writes attribute
Saved Shortcode id (pick a saved shortcode and everything below is optional)
View view
Categories (multi-select) categories
Cuisines (multi-select) cuisines
Courses (multi-select) courses
Limit limit
Order by orderby
Order order
Featured only featured
Minimum rating min_rating
Columns override columns
Dark mode dark_mode
Pagination pagination / pagination_style / per_page

Changes in the sidebar update the live preview in real time. Under the hood, the block renders the [plugixarecipe] shortcode with the chosen attributes — one source of truth between shortcode and block.

Live preview in the editor

The block uses server-side rendering (render_callback on the PHP side). That means you see the real rendered grid inside the editor:

  • Switching views / columns updates the preview.
  • Saved shortcodes render with their saved config.

Full-width & alignment

The block supports the standard WordPress alignment options (wide, full). Combined with a view’s containerPadding: 0, you can create edge-to-edge recipe walls.

Custom classes

Use the Advanced → Additional CSS class(es) panel to add a class to the wrapper — handy for theme-specific tweaks without editing the view’s customCss.

Quick Links