Yummy Docs

Frequently asked questions

Why are all recipes showing a not found error message? #

You may need the flush the URL structure of your site after installing the plugin. Go to Settings → Permalinks and click Save Changes. You don't have to change the anything, just save the settings. This clears the URL structure of the site, and makes sure that the URLs for recipes work correctly.

Can I add my own taxonomies? #

Yes, you can! If the built-in taxonomies (course, cuisine, special diet, collection, skill level, tag) are not enough for your needs, you can register more taxonomies. Here are the details.

Why the recipe search and filtering options are not visible when using the Search Form block? #

You must have recipes published using the taxonomy terms which the recipes are filtered on.

For example: if you don't have recipes using the Course taxonomy, the filtering option for the Course won't be displayed.

How can I change the image used for a term card? #

Open the term you would like to edit. For example: go to Recipes → Courses and click the title of the term. Now you can select or upload an image for the term. The image is used on term cards for example in the Term Index block.

How to remove the 'hentry' class from the HTML? #

As the structured data is added by the plugin as JSON, the 'hentry' class on single recipe template may sometimes cause warnings for example on Google Search Console. Fortunately there is a function in the plugin which removes the class. To activate the function use this little code snippet:

add_filter( 'post_class', 'yummy_remove_hentry_post_class' );

I don't want to use the recipe card at all. Can I use a fully customized template for recipes? #

Yes. You can get the YummyRecipe object like this:

$recipe = yummy_get_recipe_object( $post_id );

Then you can use the object just like you want in your custom template.

The recipe card is showing way too wide on my site. How can I adjust the width? #

You can use this CSS snippet at Appearance → Customize → Additional CSS.

.yummy-big-card {max-width:400px;}

I want to change order of sections in the big recipe card. Is it possible? #

If you would for example to have the instructions to be before the ingredients.
You can use some custom CSS, more specifically the order property to change the order. Read more at https://developer.mozilla.org/en-US/docs/Web/CSS/order

.yummy-big-card-ingredients {
order: 3;
}

.yummy-big-card-instructions {
order: 2;
}

.yummy-big-card-buttons {
order: 9;
}

Changing the element order with CSS does not change the order in source code. Other possibility is to use WordPress hooks to change the order.

Elements to the big recipe card are added with WordPress actions. To change the order of the elements, you can change the priority of a chosen action.

function remove_my_action() {
remove_action( 'yummy_big_card_middle', 'yummy_template_taxonomies', 11 );
add_action( 'yummy_big_card_middle', 'yummy_template_taxonomies', 15 );
}
add_action( 'init', 'remove_my_action' );

I want to remove an element from the recipe card. How that can be done? #

Removing the elements can be accomplished using the actions just like in the previous example.

function remove_my_action() {
remove_action( 'yummy_big_card_middle', 'yummy_template_taxonomies', 11 );
}
add_action( 'init', 'remove_my_action' );

To remove an action, the priority must match the priority with the function that was originally added. You can find the default priorities for actions in the file /inc/template-hooks.php.

Can you customize the plugin for me? #

No, plugin customization is not included with the support. Please see our Item Support Policy.

How can I prepend recipe title on my homepage, archives, etc.? #

This is especially useful if you have enabled the option to show your recipes along with other posts in homepage, archives etc.

Here's a function to prepend recipe titles with 'Recipe: '.

function yummy_filter_prepend_title( $title, $id ) {
if ( ( is_home() || is_archive() || is_single() ) && 'yummy_recipe' === get_post_type( $id ) ) {
return 'Recipe: ' . $title;
}

return $title;
}
add_filter( 'the_title', 'yummy_filter_prepend_title', 10, 2 );

Now the title of your recipes shown on the homepage, archives etc look like 'Recipe: Delicious Chocolate Cookies'.

Why is an amount like '2' in ingredient list converted into a number with a fraction when I use the button to change servings? #

This is the default behavior in the plugin. Luckily there's a filter to change this. Here's how to disable this feature with a filter, and convert numbers into decimals.

function my_filter_do_not_prefer_fractions( $value ) {
return false;
}
add_filter( 'yummy_filter_prefer_fractions_in_ingredient_amounts', 'my_filter_do_not_prefer_fractions' );