Support

Account

Home Forums Front-end Issues Displaying and linking to the post chosen within Flexible Content layout field Reply To: Displaying and linking to the post chosen within Flexible Content layout field

  • <?php if(get_row_layout() == "two_eq_columns"): ?>
    	 
    	<div class="two-eq-cols">
    	<?php 	 				 			
    	$TheID = get_sub_field('left_50-50_column');
    	$TheID = $TheID->ID;
    	$page_data = get_page($TheID);	 			
    	?>
                    
                    
    	 			
    <a href="<?php echo $post_object; ?>">
    <?php the_sub_field(‘two_eq_columns’); ?><h2>
    <?php echo $page_data->post_title; ?></h2></a>
                
    	<?php echo $page_data->post_excerpt; ?>		
    
    	 		</div>
    
    	<div class="two-eq-cols">
    	<?php 	 				 			
    	$TheID = get_sub_field('right_50-50_column');
    	$TheID = $TheID->ID;
    	$page_data = get_page($TheID);
    	?>
    
    <a href="<?php echo $post_object; ?>">
    <?php the_sub_field(‘two_eq_columns’); ?><h2>
    <?php echo $page_data->post_title; ?></h2></a>
                    
    <?php echo $page_data->post_excerpt; ?></div>
    	 		
    	<div class="clearit"></div>
    
    		<?php endif; ?>	

    Thanks Jonathan. Hadn’t spotted that.