WordPress get recent post except first 3 posts

0

How to check and get recent post 3 in wordpress? On another way it’s calling exclude posts.I’m going to explain this in 2 methods.First method is getting first 3 posts into an array. When we’re going to display the posts, checking current post ID if exist in that array. If exist continue the loop.If not exist then display the posts.Other method is passing parameter “offset”.

Method – 1

Method – 2

In here you can pass parameter “offset” to fetch post query as following.

This query is telling the loop to only display 5 posts which follow the most recent first post. The important part in this code is “offset” and this magic word is doing the whole thing.

Share.

About Author

Sumith Harshan is the Web Engineer Specializes in Java Script, JQuery, HTML4/5, CSS2/3, PHP, CodeIgniter, CakePHP, J2SE, J2EE, XML, Hacking & Security, Mobile Interface Developing, Magento, Wordpress, Joomla, Drupal,PHPBB,Facebook App Developing and Open cart...etc.