-
-
Save billerickson/530b2d118fb2758773df372c5c4cadb9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Get the recipes inside this post. | |
global $post; | |
$recipes = WPRM_Recipe_Manager::get_recipe_ids_from_content( $post->post_content ); | |
// Access the first recipe, if there is one. | |
if ( isset( $recipes[0] ) ) { | |
$recipe_id = $recipes[0]; | |
$recipe = WPRM_Recipe_Manager::get_recipe( $recipe_id ); | |
// Output the recipe name. | |
echo $recipe->name(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment