Created
September 8, 2014 15:28
-
-
Save t0t/c04c2515713c2f21f410 to your computer and use it in GitHub Desktop.
"Post Object" only showing post ID's
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://t0theme.sergiofores.net/pagina-ejemplo/ | |
<?php elseif(get_row_layout() == "posts_carrousel"): //Layout Carrusel ?> | |
<div class="row"> | |
<h3 class="h1"><?php the_sub_field("title"); ?></h3> | |
<h3><?php the_sub_field("description"); ?></h3> | |
<?php if(get_sub_field("repeater")): ?> | |
<?php while(has_sub_field("repeater")): ?> | |
<?php $post_objects = the_sub_field('post_item'); | |
if( $post_objects ): ?> | |
<ul> | |
<?php foreach( $post_objects as $post_object): ?> | |
<li> | |
<a href="<?php echo get_permalink($post_object->ID); ?>"><?php echo get_the_title($post_object->ID); ?></a> | |
<span>Post Object Custom Field: <?php the_field('post_item', $post_object->ID); ?></span> | |
</li> | |
<?php endforeach; ?> | |
</ul> | |
<?php endif;?> | |
<?php endwhile; ?> | |
<?php endif; ?> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment