Support

Account

Forum Replies Created

  • Hi,

    The images display on every page other than the individual category pages.

    I have checked my rules and I have it set to.

    Show this field group if -> Post Type is equal to Case Study.

    I am guessing I need to add to this rule setting to get the image to output on the front end?

    If so what do I need to change?

    Thanks

    Dan

  • I got this to work simply by running a separate loop for the repeating fields like in the documentation.

    Not sure if it is inefficient code or not, but it works. Here is my code outside of my normal loop

    <?php 
    if(get_field('added_content')): while(the_repeater_field('added_content')): ?>
    	<div id="added_content" class="row" style="background:url(<?php the_sub_field('background_img');?>) no-repeat center center;background-attachment:fixed;background-size:cover;">
    	<div class="custom_content">
    		<?php the_sub_field('custom_content');?>
    	</div>
    	</div>
    <?php endwhile; endif;?>

    Thanks

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