Support

Account

Home Forums ACF PRO shortcode Reply To: shortcode

  • Hi,
    Could you try this…

    function horairesEte() {
    	ob_start();
    	if( have_rows('horaires_ete', 'option') ):
    		while ( have_rows('horaires_ete', 'option') ) : the_row();
    			return '<span class="jours">'.the_sub_field('jours').'</span><span class="ouverture">'.the_sub_field('ouverture').'</span>-<span class="fermeture">'.the_sub_field('fermeture').'</span>';
    		endwhile; 
    	endif;
    return ob_get_clean();
    }
    add_shortcode('horaires_ete', 'horairesEte');