WordPress.org

Ready to get started?Download WordPress

Forums

Advanced Custom Fields
[resolved] Repeat fields Two columns (3 posts)

  1. ufita
    Member
    Posted 1 year ago #

    I am using repeat field. I want to show an image in the left and text in the right, the same how look this example.

    http://www.advancedcustomfields.com/add-ons/repeater-field/

    The preview of the website all the images are align on the top and don't with the block of text.

    What is the right code for this?

    I tried with div but doesn't work

    <?php

    // or the_repeater_field + the_sub_field
    if(get_field('services')): ?>
    <?php while(the_repeater_field('services') ): ?>

    <div id="services">
    <img src="<?php the_sub_field('services_images'); ?>" class="image-left" />
    <div id="services-right"><?php the_sub_field('services_content'); ?></div>
    </div>

    <?php endwhile; ?>

    <?php endif; ?>

    http://wordpress.org/extend/plugins/advanced-custom-fields/

  2. elliotcondon
    Member
    Plugin Author

    Posted 1 year ago #

    This is all up to the CSS, your PHP code is fine, just edit your CSS to float the image to the left, etc

  3. ufita
    Member
    Posted 1 year ago #

    Hi Elliot, Thank you so much. I did it with css and before your answer my question and working fine, just I thought that maybe exist another way. :-)

    Thank u again, sweet.
    ufita

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic