Created
August 17, 2014 23:03
-
-
Save billerickson/98be4770b322d1832c9d to your computer and use it in GitHub Desktop.
Displaying repeating ACF fields without using ACF functions
This file contains hidden or 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 | |
| $testimonials = get_post_meta( get_the_ID(), 'be_testimonial', true ); | |
| if( $testimonials ) { | |
| echo '<div class="testimonials">'; | |
| for( $i = 0; $i < $testimonials; $i++ ) { | |
| $content = get_post_meta( get_the_ID(), 'be_testimonial_' . $i . '_content', true ); | |
| if( $content ) | |
| echo '<div class="testimonial">' . wpautop( $content ) . '</div>'; | |
| } | |
| echo '</div>'; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment