Support

Account

Home Forums ACF PRO WYSIWYG in repeter field

Solved

WYSIWYG in repeter field

  • Hi, I have a problem with a WYSIWYG filed inside a repeaterfield.

    I have tried different theme with all other plugins disabled and using WP 4.1 and ACF 5.1.5

    Code in WYSIWYG editor inside the repeater field:
    <p class="box-heading">Latest blogpost</p>

    The same code as above in the WordPress WYSIWYG editor is working with styling and so on.

    When I inspect element it looks like this: Screenshot

    If I click Edit as HTML I get this code:
    <div class="col-sm-4" <p="">Latest blogpost<p></p>

    When I go to view source I get this, which is correct:
    <p class="box-heading">Latest blogpost</p>

    The problem is that no styling is following to the class.

    The code used in the template file

    
    <div class="row">
    
    	<?php
    // check if the repeater field has rows of data
    if( have_rows('row') ):
     	// loop through the rows of data
        while ( have_rows('row') ) : the_row();
    ?>
            <div class="<?php the_sub_field('column_width');?>" 
    
        <?php the_sub_field('column_content'); ?>
    </div>
    
    <?php
        endwhile;
    else :
        // no rows found
    endif;
    ?>
  • Could I get some leads on what might be the problem?

  • i think you miss the closing > of the opening div tag
    <div class="<?php the_sub_field('column_width');?>">

  • Thank you! Such a elementary misstake!

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

The topic ‘WYSIWYG in repeter field’ is closed to new replies.