Skip to content

Instantly share code, notes, and snippets.

@yumyo
Created July 7, 2016 16:23
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 yumyo/b767c5741ca13d4fe5d3e67c6e4c5adb to your computer and use it in GitHub Desktop.
Save yumyo/b767c5741ca13d4fe5d3e67c6e4c5adb to your computer and use it in GitHub Desktop.
<?php $args = array(
'posts_per_page' => 5,
'offset' => 0,
'category' => '',
'category_name' => '',
'orderby' => 'date',
'order' => 'DESC',
'include' => '',
'exclude' => '',
'meta_key' => '',
'meta_value' => '',
'post_type' => 'post',
'post_mime_type' => '',
'post_parent' => '',
'author' => '',
'author_name' => '',
'post_status' => 'publish',
'suppress_filters' => true
);
$posts_array = get_posts( $args ); ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment