wphats

How to display posts by DAILY, WEEKLY & Others Various Type

How to display posts by DAILY, WEEKLY & Others Various Type

Today i am going to show you the code to display posts by Daily, Weekly, Monthly, Yearly & some other few custom ways those are really become necessary somewhere, somehow indeed.

First we will look into the ‘Daily’ based posts where the below methods can help you. For your learning purpose, i have tried to give all the possible ways that i know:

POST FOR TODAY

WAY-1:

 

WAY-2:

 

POST FOR RECENT WEEK/LAST WEEK

WAY-1:

WAY-2: (available after WordPress 3.7)

 

 

For monthly display posts there have archive format but if you want to display the last 30 days posts then you have to use a handy code here:

POST FROM LAST 30 DAYS:

WAY-1:

 

WAY-2:

 

============================ VARIOUS DATE QUERY POSTS ==========================

 

Returns posts dated December 16, 2013:

 

Return posts between 9AM to 5PM on weekdays:

 

Return posts from January 01, 2014 TO February 28, 2014:

 

Return posts made over a year ago but modified in the past month:

 

That’s all for today. Still if you face any problem feel free to drop a message here. Thanks.

This post has already been read 1380 times!

Mehedi Hasan

Cool WordPress Developer having much agile experience to develop any kind of WordPress sites & plugins. Also good in troubleshooting, fixing & making any kind of tweaks for WP site.

More Posts

POSTED ON: Wordpress Development, Wordpress Support
TAGGED : , ,

Leave a Reply

Your email address will not be published. Required fields are marked *