Contents
On this page

Permalinks & URLs - Plugixa Recipe

Plugixa Recipe registers four custom URL patterns via WordPress rewrite rules. They’re flushed automatically on plugin activation - no manual Settings → Permalinks visit required.

The URLs

Pattern Handler Template
/recipe/{id}/{slug}/ class-recipe-single.php templates/single-recipe.php wrapped by templates/single-recipe-wrapper.php
/recipe-category/{slug}/ class-recipe-archive.php templates/archive.php wrapped by templates/archive-wrapper.php
/recipe-cuisine/{slug}/ class-recipe-archive.php templates/archive.php
/recipe-print/{id}/ class-recipe-print.php templates/print.php (no theme wrapper)

Changing the base slugs

By default the bases are recipe, recipe-category, recipe-cuisine, recipe-print. Change them in Settings → Advanced → Permalink bases. Your new bases apply after clicking Save & flush rewrites. The plugin calls flush_rewrite_rules() under the hood - you don’t have to visit Settings → Permalinks manually.

The single recipe template

templates/single-recipe.php renders:

  1. Hero (image, title, meta, author, rating).
  2. Description.
  3. Ingredients (with servings adjuster).
  4. Instructions (grouped, checkable).
  5. Nutrition label.
  6. Reviews + review form.
  7. Share & print buttons.
  8. Related recipes.

A single recipe page for Classic Margherita Pizza: hero photograph, category chips, title and description, a four-star rating, an at-a-glance panel of prep, cook and total time with servings, difficulty and cuisine, Print, Saved and Share buttons, an Adjust Servings control, and the start of the grouped ingredient list

Theme wrapper

single-recipe-wrapper.php wraps the main template in the current theme’s header + footer. If your theme uses a non-standard layout, override the wrapper by copying it to wp-content/themes/{your-theme}/plugixa-recipe/single-recipe-wrapper.php.

Overriding any template

The plugin template loader checks the theme first:

wp-content/themes/{your-theme}/plugixa-recipe/{template}.php

Fallback is the plugin’s templates/ folder. This is the classic “plugin templates override” pattern - clean updates never clobber your changes.

The print page

/recipe-print/{id}/ renders a clean, ad-free, print-friendly page (a single column, no nav, no sidebar). Users click the Print button on the single recipe page to open it.

Since 1.2.0, the print page shows everything the recipe page shows (equipment, notes, tips, source, rest time, yield, course, and each step’s title, time and photo), prints the amounts and units the reader chose with Reader Tools, and lets the reader leave out images, notes or nutrition.

Print page

The template templates/print.php uses a dedicated CSS file (assets/frontend/build/css/frontend.css with print media queries) so paper output looks good without your theme’s hover states, animations, or dark modes.

Category / cuisine archives

/recipe-category/desserts/ loads the archive template with:

  • Category / cuisine header (name, description, image).
  • Filter bar (sort, per-page, search).
  • Recipe grid using the default view.

The archive respects the active language (via WPML / Polylang) and filters automatically.

SEO consequences

  • A recipe page names its own address, /recipe/{id}/{slug}/, as its canonical. When the recipe is embedded in a post, the canonical is that post instead.
  • An address for a recipe, or a recipe archive, that does not exist answers 404 instead of showing the blog.
  • Since 1.2.0, published recipes and the recipe category and cuisine archives that have recipes are listed in WordPress’s own sitemap (/wp-sitemap.xml), including with Polylang active. Drafts are never listed.
  • noindex is added to the print page to avoid duplicate-content issues.
  • Every recipe page carries Recipe JSON-LD, free since 1.2.0.

Quick Links

Share