Created
June 29, 2016 10:29
-
-
Save amanhstu/ed98a1fb0b2d179567d252aad0dd5478 to your computer and use it in GitHub Desktop.
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
<?php | |
$post_object = get_field('field'); | |
if($post_object) : | |
$post = $post_object; | |
// Overwrite $post | |
setup_postdata( $post ); ?> | |
<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a> | |
<?php | |
// Reset $post so the rest of the page works | |
wp_reset_postdata(); | |
endif;?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment