How to fix HTML in repeating function ACF - Hack The Tech - Latest News related to Computer and Technology

Hack The Tech - Latest News related to Computer and Technology

Get Daily Latest News related to Computer and Technology and hack the world.

Tuesday, June 1, 2021

How to fix HTML in repeating function ACF

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 I want them (li) in the same place (ul) check this picture the result result what i want what i want



source https://stackoverflow.com/questions/67781071/how-to-fix-html-in-repeating-function-acf

No comments:

Post a Comment