igmoweb
10/3/2014 - 2:42 PM

Portfolio Query

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>';