Home Forums Add-ons Flexible Content Field Displaying the flexible content?


Displaying the flexible content?

  • What is going wrong with my code here, as nothing is being shown front end, apologies i’m sure its something simple…

    					<!--Field Name-->
    <?php if( have_rows('clients_list') ): ?>
    	<ul class="slides">
    				 			<!--Field Name-->
    	<?php while( have_rows('clients_list') ): the_row(); ?>
    				 							<!--Layout Name-->
    				<?php if( get_row_layout() == 'client_detail' ):?>
    					<!--Row Field Name-->
    					<?php the_field('client_name'); ?>
    					<!--Row Field Name-->
    					<?php the_field('client_url'); ?>
    				<?php endif; ?>
    			<?php endwhile; ?>
    	<?php endif; ?>
  • Hard to know for sure as there is no way of knowing how you have your custom fields set up but by looking at your code you could try changing:
    <?php the_field(‘client_name’); ?> to <?php the_sub_field(‘client_name’); ?> and same with the other field.

  • I’m sorry here, is a screen shot..

    flexible fields

  • Well, did you try with the code I posted? As to me that seems to be the only thing wrong.

    <?php the_field(‘client_name’); ?> to <?php the_sub_field(‘client_name’); ?>

  • Brilliant thank you , yes that works. 🙂

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

The topic ‘Displaying the flexible content?’ is closed to new replies.