Home I am using ACF repeater, but the sub field showing paragraphs without space between words?
Reply: 0

I am using ACF repeater, but the sub field showing paragraphs without space between words?

Umar
1#
Umar Published in 2018-01-13 10:33:01Z

I am using ACF repeater, in which there are three fields, one is for heading, another is for description, and one is for image. The problem is that the description is coming without space between words on the front end. However it is okay in backend. I am using the following codes:

if( have_rows('main_repeater') ): ?>

               <?php 

                    // loop through rows (parent repeater)
                    while( have_rows('main_repeater') ): the_row(); ?>
                        <div class="rtires">
               <div class="box">
               <h2 class="tire"><?php the_sub_field('heading');?></h2>
               <p><?php echo get_sub_field('content');  // This content is coming without space between words
?></p> 
               <?php 

                            // check for rows (sub repeater)
                            if( have_rows('image_repeater') ): ?>
                            <?php 

                                // loop through rows (sub repeater)
                                while( have_rows('image_repeater') ): the_row();

                                    // display each item as a list - with a class of completed ( if completed )
                                    ?>
              <div class="tire-list">

                    <a href="#" class="thumbnail">
                        <img src="<?php the_sub_field('tire_image');?>" class="attachment-full size-full wp-post-image" alt="" width="300" height="300">                                                <span class="name">lOREM Ipsum</span>
                    </a>
                    </div>
                    <?php endwhile; ?>
                    <?php endif; //if( get_sub_field('items') ): ?>

So what so I do to get the normal text as it is looking in the backend?

Update: For example, the text should look like this

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

But it is coming this way:

Loremipsumdolorsitamet,consecteturadipisicingelit,seddoeiusmod temporincididuntutlaboreetdoloremagnaaliqua.

However when I inspect that text using developer tools, it is in the proper manner.

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.312137 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO