first of all I´m a beginner in coding, I wrote this function to show ACF repeater timleine And he returns the result to me, but a problem when I add html
function wpb_nos_formules(){
$html = '';
if( have_rows('formule') ) :
$html .='<section class="design-process-section" id="process-tab">
<div class="container">
<div class="row">
<div class="col-xs-12">';
while( have_rows('formule') ) : the_row();
$title = get_sub_field("title");
$html .='<ul class="nav nav-tabs process-model more-icon-preocess" role="tablist">
<li role="presentation" class="active"><a href="" aria-controls="discover" role="tab" data-toggle="tab"><i class="fa fa-search" aria-hidden="true"></i>
<p>'.$title.'</p></a></li>
</ul>';
if( have_rows('slider') ) :
$html .='<div class="tab-content">';
while( have_rows('slider') ) : the_row();
$titlee = get_sub_field("title");
$description = get_sub_field("description");
$html .='
<div role="tabpanel" class="tab-pane active" id="">
<div class="design-process-content">
<h3 class="semi-bold">'.$titlee.'</h3>
<p>'.$description.'</p>
</div>
</div>';
endwhile; endif;
$html .='</div>';
endwhile; endif;
$html .='</div></div></div></section>';
return $html;
}
add_shortcode( 'latest_nos_formule', 'wpb_nos_formules' );
first problem check this picture the result what i want
source https://stackoverflow.com/questions/67781071/how-to-fix-html-in-repeating-function-acf
Comments
Post a Comment