Created
August 18, 2016 23:32
-
-
Save joelstransky/84cbecfc0e5291ba98648c9c1ab7fc0f 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
$post_id = (int) $_POST['post_id']; | |
$query = new WP_Query( array( 'p' => $post_id ) ); | |
if( $query->have_posts() ) { | |
while ( $query->have_posts() ) { | |
$query->the_post(); | |
write_log( array( 'is post' , get_post_format() ) ); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment