Created
January 10, 2016 03:26
-
-
Save jonlow/15a600adee7bceb5bcb8 to your computer and use it in GitHub Desktop.
External php file that can hook into Wordpress (+ Advanced Custom Fields) functions
This file contains hidden or 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 | |
include('wp-load.php'); | |
$post = get_post(2); | |
setup_postdata( $post ); | |
?> | |
<h3><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3> | |
<span>Post Object Custom Field: <?php the_field('map_location'); ?></span> | |
<?php | |
wp_reset_postdata(); | |
?> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment