• Resolved derickkati

    (@derickkati)


    I have created repeater in the ACF including image repeaters.

    In the same time I configured WPGLOBUS multilingual plugin as well.

    But when I try to get image url with, it return as empty. But if we disable the WPGLOUS plugin it works fine. Please refer code block as below.

    <?php
    if( have_rows(‘home_solution_image_box’) ):
    while ( have_rows(‘home_solution_image_box’)) : the_row();
    $image = get_sub_field(‘home_solution_image’);
    $course_link = get_sub_field(‘home_solution_image_link’);
    ?>
    <div class=””>
    “>
    ” alt=””>

    </div>
    <?php
    endwhile;
    else :
    // no rows found
    endif;
    ?>

    Can anyone advice me how I can I get the image url with WPGLOUS implementation.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Alex Gor

    (@alexgff)

    Could you clarify what the setting of sub-fields is inside repeater?

    Thread Starter derickkati

    (@derickkati)

    Field Name: home_solution_image
    Field Type: Image
    Required? : Yes
    Return Value: Image URL
    Preview Size: Thumbnail (150 X 150)
    LibraryP: All
    Conditional Logic: No

    Thanks.

    Plugin Contributor Alex Gor

    (@alexgff)

    Try this code

    <?php
    $image = get_sub_field('home_solution_image');
    
    if ( is_array($image) && ! empty( $image['url'] ) ) {
    	$_image_url = $image['url'];
    } else {
    	$_image_url = $image;
    } ?>
    <img src="<php echo $_image_url; ?>" />
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘WPGLOBUS not working with Repeater Image (ACF)’ is closed to new replies.