Forked from armandmorin/testimonial-meta-output.php
Created
September 1, 2011 17:46
-
-
Save farinspace/1186752 to your computer and use it in GitHub Desktop.
sample output
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 | |
global $testimonial_metabox; | |
$testimonial_bg = $testimonial_metabox->get_the_value( 'background' ); | |
$testimonials = $testimonial_metabox->get_the_value( 'testimonials' ); | |
?> | |
<?php foreach ($testimonials as $testimonial) { ?> | |
<div class="<?php echo $testimonial_bg; ?>"> | |
<?php echo wpautop( $testimonial['content'] ); ?> | |
<?php echo $testimonial['name']; ?><br/> | |
<?php echo $testimonial['audio']; ?> | |
</div> | |
<?php } ?> | |
<!-- OR --> | |
<?php | |
global $testimonial_metabox; | |
$testimonial_bg = $testimonial_metabox->get_the_value( 'background' ); | |
while( $testimonial_metabox->have_fields( 'testimonials' ) ) | |
{ | |
echo '<div class="' . $testimonial_bg . '">'; | |
echo wpautop( $testimonial_metabox->get_the_value( 'content' ) ); | |
echo $testimonial_metabox->the_value( 'name' ); | |
echo '<br/>'; | |
echo $testimonial_metabox->the_value( 'audio' ); | |
echo '</div>'; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment