Support

Account

Forum Replies Created

  • I feel so dumb right now. The answer was beyond simple. All I had to do was call the field using $testimonialsections['stars'];:

    Full answer (sorry that my indenting gets all screwy when I paste it in here):

    <?php
                           // using normal array
                         
                           $testimonialsections = get_field('testimonial_section');
    					   $yelp_url = get_field('yelp_url', 'options');
    					   
    					   
    					   
    					   
    	
    					   
                           if($testimonialsections)
                           {
                         
                               foreach($testimonialsections as $testimonialsection)
                               {
    							
    							   
    							   
                                   
                                   echo '<div class="inner-test row">
    										<div class="col-md-12">
    											<p><span style="font-weight:bold">' .$testimonialsection['testimonial_author'].'</span><br/>' .$testimonialsection['stars'].'</p>
    										</div>
    										<div class="col-md-12">
    										
    											' .$testimonialsection['testimonial'].'
    				
    											<a href="'.$yelp_url.'" target="_blank">View More on Yelp!</a>
    											
    										</div>
    									</div>';
                               }
                         
                            }
                         
                            ?>
  • I’m a little late to responding to this, but it turned out to be a cache issue. Even after clearing my cache numerous times, my updates still weren’t registering. I left it alone and came back to it the next day, and that seemed to have done the trick.

  • When I test the data, I get:

    
    <pre>string(93) "http://website.com/wp-content/uploads/sites/2/2013/09/1b8821.jpg" </pre>

    So it’s definitely recognizing the attachment id (I replaced the website URL with “website.com,” but the string it originally spit out is working.)

Viewing 3 posts - 1 through 3 (of 3 total)