Are you a GenerateCustomer?

Do you have an active GP Premium or GenerateBlocks Pro license key?

Create a GenerateSupport account for GeneratePress and GenerateBlocks support in one dedicated place.

Create an account
Already have a GenerateSupport account? Login

Just browsing?

Feel free to browse the forums. Support for our free versions is provided on WordPress.org (GeneratePress, GenerateBlocks).

Want to become a premium user? Learn more below.

Image before Recipe Shortcode

  • Hi,

    I wan’t to add an image before every recipe block and only there. The recipe is inserted with that shortcode [wprm_recipe_shortcode_output]

    Should I do that with an ACF Custom Field or can I do it also with an Element Hook Block? And how can I insert that block into the theme with PHP?

    Greetings Kathrin

  • Hi there,

    Where will this image be fetched from? Is it a featured image?

    It would be great if you could provide the page example so that I can fully understand the context.

  • Hi,

    it isn’t a featured image, it should be an image with some text on it, something like an info-graphik. The image should be fetched from the mediathek or from an element.

    I have added an Recipe-URL in the private section. The image should appear before the recipe.

    Greetings Kathrin

  • Will it be placed before the title? You can use the Block Element – Page Hero for that.

  • No it should be placed here: https://imgur.com/a/XZT01h4

    The recipe block is inserted with a shortcode in the middle of the page.

    Greetings Kathrin

  • Hi there,

    why not manually add the image before the recipe shortcode ?
    It the simplest and would be the most performant option

  • It should be same image before every recipe. I want to use it as a call to action like you have enjoyed the recipe – let’s leave a comment or stars here. I don’t want it to manually place it on 200 recipes 🙁

    Greetings Kathrin

  • It’s not possible, unfortunately.

    Unless you can add the image to the shortcode, you might need to check with the shortcode provider.

  • Here is an example from another site: https://imgur.com/a/9l5PmHm, you can find the link in the private section.

    Greetings Kathrin

  • The example shows that the image is included with the wprm shortcode content:
    https://www.screencast.com/t/2A1BQWDxywXY

    Please check with the plugin’s support team on how to achieve that.

    Thanks for your understanding.

  • Hi, thank you very much. I will discuss it with the plugin developer. I’m using the same as the guy in the example.

    Greetings Kathrin

  • No problem 🙂

Viewing 12 posts - 1 through 12 (of 12 total)
  • You must be logged in to reply to this topic.