• Resolved hakket

    (@hakket)


    I’m looking for a way to show the “total time” field from recipe maker in a custom php archive loop.
    I already fetched the Post ID and the Recipe ID and I am able to show the FULL recipe through a custom shortcode shown below.

    — Get ID’s
    $recipes = WPRM_Recipe_Manager::get_recipe_ids_from_post();
    $recipe_id = $recipes[0];

    — Display:
    echo do_shortcode(‘[wprm-recipe id=”‘ . $recipe_id . ‘”]’);

    How am I able to fetch the “total time” field of a given recipe and show it?

    Best regards

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

    (@brechtvds)

    Hi there,

    We have different shortcodes for all of the recipe fields:
    https://help.bootstrapped.ventures/article/83-recipe-shortcodes

    [wprm-recipe-time type=”total” id=”123″] would work for this, for example.

    The easiest way to find the shortcode you need is to use our Template Editor to add a block, set the properties the way you want and then copy the shortcode it generated from under “Edit HTML”.

    Just something like that I was looking for to display the recipe fields in other sections of my page, but for some reason it was not working, it took me some time to find the reason. The shortcode you inserted in your comment you did it using right double quotation mark and the correct character would be quotation mark lol.

    If you can modify your comment with that correction [wprm-recipe-time type="total" id="123"] it would be very useful for those who are coming. Best regards friend Brecht.

    Plugin Author Brecht

    (@brechtvds)

    @tiposamuel thanks for the correction. I did indeed forget to put the shortcode inside of a code snippet, so I think it automatically used the stylized quotes.

    At this point I can’t edit the comment anymore, so I hope others will see yours.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Recipe Time Shortcode’ is closed to new replies.