Skip to content

Instantly share code, notes, and snippets.

@jrstaatsiii
Created December 1, 2013 16:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jrstaatsiii/7736698 to your computer and use it in GitHub Desktop.
Save jrstaatsiii/7736698 to your computer and use it in GitHub Desktop.
Issue with ACF Post Object
<?php if ( get_field('ssm_featured_course', 'options') ) { ?>
<?php $post_object = get_field('ssm_featured_course', 'options'); ?>
<?php $post = $post_object; ?>
<?php setup_postdata( $post ); ?>
<div id="featured-course">
<div class="wrap">
<small>Featured Course</small>
<p class="faux-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></p>
<?php if ( get_field('ssm_course_description') ) { ?>
<div class="course-description">
<?php the_field('ssm_course_description'); ?>
</div>
<!-- end .course-description-->
<?php } ?>
<a class="button red" href="<?php the_permalink(); ?>">View Course</a>
</div>
<!-- end .wrap -->
</div>
<!-- end #featured-course -->
<?php wp_reset_postdata(); ?>
<?php } ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment