1
I am making a loop in wordpress using Wp_query and need to list me only from the 2 post, ignore the 1 first post.
In the past I used query_posts('offset') to do this, but using wp_query I’m not getting it.
Could someone give me this help to see if I’m doing right?
follows the code:
$args2 = array(
'post_type' => 'post',
'posts_per_page' => '5', // listando 5 posts por página
'offset' => '-1', // mostrando a partir do 2 post.
'meta_query' => array(
array(
'key' => 'postagem_destacada',
'value' => '1',
'compare' => '=='
)
)); $query_slider2 = new WP_Query($args2);
help someone?
didn’t work tried to do the way you put it most didn’t work!
– Luciano Oliveira Lima
Updated code, did not have to test before, try again.
– Rafael Alexandre
Yes, but I’m now with another problem, I just want to list only 2 posts, 2 and 3 of the loop! http://i.imgur.com/iaXBAmz.jpg looks at how it looks like!
– Luciano Oliveira Lima
Okay, if my answer solved your initial problem, I advise you to mark this answer as accepted and open a new topic to your other problem, so we make it easier for other people who have the same problem as you to find a solution.
– Rafael Alexandre