I have the following code from a WP site that a client give to me already set.
$featured_args = array(
‘post__in’ => get_option( ‘sticky_posts’ ),
$featured_loop = new WP_Query( $featured_args );
while( $featured_loop->have_posts() ) :
Problem is, I just want to show the latest 5 sticky posts, and no more. Already tried methods here on forums to resolve it, but none worked. ¿Can someone help me?
- The topic ‘WP_Query and limit post’ is closed to new replies.