Support » Plugin: WP Ultimate Recipe » Adding cooking time, servings etc.

  • I would like to add the cooking time and amount of servings to my single.php page on WP to header where I also display my article’s image.

    I got them to show up inside <article> tags, but I would like to display them outside of these tags and display them on a custom <div> that I created.

    Does anyone have idea how to do this?
    + Is there a page where I can see all the codes? Atm I’m using at the function.php codes like “WPURP_Template_Recipe_Cook_Time();”

    Is there any easier way to display the information that I want like as a shortcode?
    (example <echo do_shortcode(‘[cooking-time]’) )

Viewing 1 replies (of 1 total)
  • Plugin Author Brecht

    (@brechtvds)

    We do not have shortcodes for the recipe fields at the moment.

    You can however access all fields using code like this:

    $recipe = new WPURP_Recipe( $recipe_id );
    echo $recipe->cook_time();

    An overview of all available functions can be found in the /core/helpers/models/recipe.php file.

    Kind regards,
    Brecht

Viewing 1 replies (of 1 total)
  • The topic ‘Adding cooking time, servings etc.’ is closed to new replies.