Skip to content

Instantly share code, notes, and snippets.

@igmoweb
Last active August 29, 2015 14:07
Show Gist options
  • Save igmoweb/fdd83b67b0e8f5155049 to your computer and use it in GitHub Desktop.
Save igmoweb/fdd83b67b0e8f5155049 to your computer and use it in GitHub Desktop.
Portfolio Query
$args = array(
'ignore_sticky_posts' => true,
'posts_per_page' => $atts['items'],
'post_type' => 'post',
'post_status' => 'publish'
);
$posts = get_posts( $args );
$html = '<ul>';
foreach ( $posts as $post ) {
// Añade a $html lo que necesites. Ejemplo: get_the_title( $post->ID )
}
$html .= '</ul>';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment