Template Overrides
Template Overrides
Copy any MisePress template into your theme to customize its markup without editing the plugin. Updates will not overwrite your overrides.
Path pattern
Mirror the plugin's templates/ folder under a misepress/ directory inside your theme:
yourtheme/misepress/parts/recipe-card.php
yourtheme/misepress/archive/archive-mp_recipe.php
yourtheme/misepress/single/single-mp_recipe.php
Copy the file from misepress/templates/... and keep the same relative path after the misepress/ theme folder.
Child themes win over parent themes; parent themes win over the plugin.
Helper
Render a part with the override-aware loader from your own templates:
\MisePress\Frontend\TemplateLoader::part(
'recipe-card',
array( 'post_id' => 123 )
);
The helper:
- Looks for
child-theme/misepress/parts/recipe-card.php. - Falls back to
parent-theme/misepress/parts/recipe-card.php. - Finally renders the plugin default at
misepress/templates/parts/recipe-card.php.
Variables passed via the second argument are extracted into the template's local scope.
Best practices
- Copy then modify. Always start from the current plugin template — older copied templates can miss security and feature updates.
- Keep BEM classes. Retain
misepress__*class names so CSS variables and any user theming continue to apply. - Don't add business logic. Wrap data lookups in helpers or filters (e.g.
misepress/schema/recipe) instead of querying the database from a template. - Re-check after updates. When you update MisePress, compare copied templates against the current files before keeping overrides.
Style customization without an override
If you only need style changes, override CSS variables instead of copying a template. See CSS Variables. This stays update-safe with zero maintenance.
Need the high-level overview? Start with MisePress Recipes, the WordPress recipe plugin.