Skip to content

Instantly share code, notes, and snippets.

Created July 9, 2015 17:29
Show Gist options
  • Save anonymous/048dc1e52585e890abbc to your computer and use it in GitHub Desktop.
Save anonymous/048dc1e52585e890abbc to your computer and use it in GitHub Desktop.
function newsPost_block_func() {
global $post;
$args = array();
$query = new WP_Query('post_type=post', $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