Skip to content

Instantly share code, notes, and snippets.

@samuelcotterall
Forked from anonymous/gist:048dc1e52585e890abbc
Last active August 29, 2015 14:24
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 samuelcotterall/a8e38bd9173d5757e6ac to your computer and use it in GitHub Desktop.
Save samuelcotterall/a8e38bd9173d5757e6ac to your computer and use it in GitHub Desktop.
function newsPost_block_func() {
global $post;
$args = array(
'post_type' => array( 'post' ),
);
$query = new WP_Query($args);
var_dump($query->have_posts());
}
add_shortcode( 'newsPost_block', 'newsPost_block_func');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment