• Hi, I used to add the following in single.php to show the snippet where I wanted it to be, which is above the feature image.

    <div class="recipe-snippet">
    							<?php echo do_shortcode( '[wprm-recipe-jump]' ); ?>
    							</div>

    But recently I changed my theme (Blocksy) and the single.php looks like this, which I’m not familiar with at all, so I have no clue where I should insert the code.

    get_header();
    
    if (
    	! function_exists('elementor_theme_do_location')
    	||
    	! elementor_theme_do_location('single')
    ) {
    	get_template_part('template-parts/single');
    }
    
    get_footer();

    I’m not sure if it’s still possible to do it in single.php or there is another way to make it happen by adding different codes in functions.php (I think it is possible because I have googled some example but with genesis theme.)

    I really enjoy using WPRM, so I hope I can still make it happen. Also, since I write posts in 2 languages, I also would like to ask if it is possible to translate the snippet automatically.

    Thank you very much.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Brecht

    (@brechtvds)

    You could try adding it before the get_template_part('template-parts/single'); line or look in the template-parts/single.php file.

    Is there a specific reason you’re doing it through the code? You also have the option to enable “Automatic Snippets” on the WP Recipe Maker > Settings > Recipe Snippets page.

    Are you using a multilingual plugin for that? When using WPML or Polylang you could have it output a different template for different languages: https://help.bootstrapped.ventures/article/132-how-to-use-this-for-a-multilingual-blog

    Thread Starter barrelleaf

    (@barrelleaf)

    Hi, thank you for replying so fast.

    I took a look in the template-parts/single.php file, but unfortunately I couldn’t find the related codes.

    I know the Automatic Snippets setting. But it adds the snippet after the feature image, whereas I want to add it before. That’s also the reason I did that before. But guess I have to use the automatic snippets for now.

    I do use WPML, but I am not using WPML String Translation. I will take a look later.

    Thank you very much.

    Nora

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Add Jump to Recipe snippet before featured images’ is closed to new replies.