Created
March 14, 2012 17:10
-
-
Save joeyblake/2037956 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 foreach ( $recipe_vars['instructions'] as $instruction ) { ?> | |
<p itemprop="recipeInstructions" > | |
<?php | |
if ($instruction['image_id'] != ""){ | |
$inst_image = wp_get_attachment_image_src( $instruction['image_id'], "medium", false ); | |
echo "<img src='{$inst_image[0]}' style='float:left;' /> "; | |
} | |
if (count($instruction['text']) > 1 ) { | |
echo '<ol>'; | |
foreach ($instruction['text'] as $numbered_inst ){ | |
echo '<li>'.$numbered_inst.'</li>'; | |
} | |
echo '</ol>'; | |
} else { | |
echo $instruction['text'][0]; | |
} | |
?> | |
<div class="clear"></div> | |
</p> | |
<?php } ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment