I am using the repeater field of the Advanced Custom Fields plugin for WordPress to display song names and where relevant, offer a sample to play using the Compact Audio plugin.
I am using the echo shortcode function and this works to an extent - however, it's not actually executing the shortcode and is instead showing the file URL (which is the value of the field "ceremonial_sample"). I have used this on other sites (albeit not within the repeater field - that's the only difference along with the field names). Can anyone tell me how to fix this?
Here is the page where I'm experiencing the problem: [login to view URL]
--------------
Code below:
<?php
// check if the repeater field has rows of data
if( have_rows('ceremonial') ):
// loop through the rows of data
while ( have_rows('ceremonial') ) : the_row();
// display a sub field value
echo '<div class="song">';
the_sub_field('ceremonial_song');
echo '<div class="sample">';
if(the_sub_field('ceremonial_sample') ):
echo
do_shortcode( '[sc_embed_player fileurl="'.the_sub_field( 'ceremonial_sample' ).'"]' );
endif;
echo '</div>';
echo '</div>';
endwhile;
else :
// no rows found
endif;
?>
Professional web developer and designer for more than 7 years. I have advanced experience in WordPress and I can start today if you're interested. Thank you very much
£22 GBP 0 gün içinde
5,0 (103 değerlendirme)
6,3
6,3
5 freelancer bu proje için ortalama £21 GBP teklif veriyor
Hello,
I understand the problem you faced. I will fix it. I have more than 8 years of experience in IT-Programming and creating websites. I have best ratings on FL and good completion ratio. above all, I am reasonable when it comes to billing.
Regards,
Sujal