Sticky posts on top if any
-
Can anybody help me with this?
I’d like to show the 4 most recent posts on my homepage with the sticky posts on top.
So, if there are 5 sticky posts, i’d like to see the first 4 of them, but if there are only 2 sticky post, i’d like to see those first + the 2 most recent non-sticky post. ??I’m now using:
$args = array( 'post_type' =>'post', 'numberposts' => '4', 'post__in' => get_option( 'sticky_posts' ), 'ignore_sticky_posts' => 1
Problem is, that wil show the sticky posts OR if there aren’t any, my 4 most recent posts.
If there is only 1 sticky post, it will only show this 1 sticky post and I’d like to add 3 non sticky posts in that case….Now that’s what I call a sticky situation ??
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Sticky posts on top if any’ is closed to new replies.