I want make custom recent post. In standard condition, the widget just show every newest post. But how to make recent post with condition, 4 newest post is disappear and start showing post from 5th posts.
illustration:
__ _ __ _ __ _ __ _ newest post | D
__ _ __ _ __ _ __ _ 2nd new post | D
__ _ __ _ __ _ __ _ 3rd new post | D
__ _ __ _ __ _ __ _ 4th new post | D
__ _ __ _ __ _ __ _ 5th new post | SS
Note:
D: Disappear | SS: Start showing
Thanks in advance.
Use the offset parameter of WP_Query
$posts = get_posts( array( 'posts_per_page' => 5, 'offset' => 4 ) );
This returns 5 posts after the 4 newest posts.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.