Recipe shortcode – line spacing within recipe-ingredients shortcode
-
Hi there, I’ve been using the recipe shortcode (https://wordpress.com/support/recipes/) on my site. I now have a recipe to share which consists of a few components (eg. crust, cheesecake, topping). When I try to break down the ingredient list between the three components like below, the ‘title’ for the component does not have a line spacing between it and the last ingredient. Is there a code to put to allow a line spacing in the shortcode within the recipe-ingredients shortcode?
[recipe-ingredients]
Crust:
– cookie
– butterCheesecake:
– cream cheese
– eggGanache:
– dark chocolate
– cream
[/recipe-ingredients] -
Hi there,
Is this on https://earlgreythursday.wordpress.com/?
This is because the ingredients shortcode has no way of knowing those are headings, rather than ingredients. It just treats everything inside the shortcode as a list of ingredients, and the spacing that does appear is just the default spacing that always get added at the start of a bulleted list. Bulleted lists don’t by default have similar spacing below them, which is why the next line appears without any break.
You can use multiple
recipe-ingredientsshortcodes for the different sections, and then use thetitleattribute to set the headings. In other words:[recipe-ingredients title="Crust:"] – cookie – butter [/recipe-ingredients] [recipe-ingredients title="Cheesecake:"] – cream cheese – egg [/recipe-ingredients] [recipe-ingredients title="Ganache:"] – dark chocolate – cream [/recipe-ingredients] -
- The topic ‘Recipe shortcode – line spacing within recipe-ingredients shortcode’ is closed to new replies.