Contents
On this page

Widget Shortcodes - Plugixa Recipe

Eight lightweight shortcodes for sidebars, landing pages, and cross-linking. Each renders from its own template in templates/widgets/ and enqueues the same frontend CSS as the main [plugixa_recipe] shortcode.

[plugixa_categories] / [plugixa_cuisines]

Your categories (or cuisines) as links to /recipe-category/{slug}/ or /recipe-cuisine/{slug}/, in one of three styles: a list, a row of pills, or a grid of cards.

[plugixa_categories]
[plugixa_cuisines style="grid" limit="12" orderby="name"]
[plugixa_categories style="pills" hide_empty="true"]

Since 1.4.2 the grid fills the width of the page, a term with no picture gets a tile with its first letter so the cards keep one height, and on a category or cuisine archive the term the page is about is marked as the current one.

The cuisines shortcode in its grid style: cards with a round photo, the cuisine name and its recipe count, and a letter tile J for Japanese Fusion, which has no picture

The cuisines widget on the frontend: eight cards in two columns, each with a circular food photograph, the cuisine name and its recipe count, from Thai with six recipes down to Chinese with one

Attribute Default Description
style list list, pills or grid
limit 10 Most terms shown
orderby display_order display_order, name or count
order ASC ASC or DESC
show_count true Show the number of published recipes beside each term
hide_empty false Since 1.4.2: leave out the terms with no published recipe. limit counts the terms before the empty ones are dropped
exclude - Comma-separated IDs to leave out
title - Optional heading above the list

[plugixa_latest_recipes]

The most-recent recipes. Good for sidebars and home page teasers.

[plugixa_latest_recipes limit="6" columns="3"]

Latest recipes widget

Attribute Default
limit 5
columns 1
show_image true
show_meta true
show_rating true
status published

Recipes sorted by view_count (default) or rating_average.

[plugixa_popular_recipes limit="5" orderby="rating_average"]
Attribute Default Description
limit 5
columns 1
orderby view_count view_count / rating_average / like_count
show_count true Show the metric value

When used on a recipe page, shows other recipes that share categories or cuisines with the current one.

[plugixa_related_recipes limit="4"]

Related-by logic (in order):

  1. Same category and same cuisine.
  2. Same category only.
  3. Same cuisine only.
  4. Fallback to recent.

A search form. Placed beside a [plugixa_recipe] listing, it filters that listing, and “load more” and pagination keep the search. With style="expanded", it also filters by category, cuisine, course, total time, difficulty and diet.

Since 1.4.2 the search box and the button share one row and the filters sit in a grid under them. Each filter in force shows as a chip: the visitor removes one filter with its chip, or all of them with Clear all.

[plugixa_recipe_search]
[plugixa_recipe_search style="expanded" title="Find a recipe"]

The expanded recipe search form: the search box and a Search button on one row, a grid of six filters for category, cuisine, course, time, difficulty and diet with Italian, Ready in 30 mins and Easy chosen, and a chip for each of those filters with Clear all

Attribute Default Description
placeholder Search recipes… Text in the empty search box
style simple simple (search box only) or expanded (with filters)
action (current page) The page the form sends its search to
title - Optional heading above the form

[plugixa_recipe_of_day]

A single randomly-chosen recipe that rotates daily (seeded by date). Large card layout.

[plugixa_recipe_of_day]

The seed uses date('Y-m-d') so everyone sees the same recipe on a given day, cache-friendly.

[plugixa_recipe_count]

Just an integer - useful for marketing lines like “Browse our 247 recipes”.

You can now browse [plugixa_recipe_count] recipes!
Attribute Default
status published
categories (all)
cuisines (all)

Using widget shortcodes in Elementor / Gutenberg

All eight shortcodes work inside any block or widget that accepts shortcodes (Gutenberg Shortcode block, Elementor Text Editor, Classic widget, etc.).

Quick Links

Share