Title: post_date_gmt in widget code
Last modified: August 20, 2016

---

# post_date_gmt in widget code

 *  [dylanvanderheij](https://wordpress.org/support/users/dylanvanderheij/)
 * (@dylanvanderheij)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/post_date_gmt-in-widget-code/)
 * I have been trying to set up a custom widget which displays all posts from a 
   certain category from today and into the future. This means, post from yesterday
   and older will not be displayed. I have managed to setup a page template that
   works fine, but now I also need a widget with the same code..
 * Can someone help me with setting up the code so that it will work in a Widget?
   I have tried, but right now I’m getting an error message when activating the 
   widget under plugins in the WordPress admin. It seems the array ‘post_date_gmt’
   is giving problems as it is not recognized as a valid string.
 * **Code of page template:**
    _[Code moderated as per the [Forum Rules](http://codex.wordpress.org/Forum_Welcome#Posting_Code).
   Please use the [pastebin](http://wordpress.pastebin.com/)]_
 * **Code of widget:**
    _[Code moderated.]_

Viewing 1 replies (of 1 total)

 *  Thread Starter [dylanvanderheij](https://wordpress.org/support/users/dylanvanderheij/)
 * (@dylanvanderheij)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/post_date_gmt-in-widget-code/#post-2280769)
 * ps. when this is finished I will clean the code and write an article about this
   widget so other people from the WordPress community can also use it. I am not
   after quick money, I’m after developing smart widgets that just do the work like
   we want to..

Viewing 1 replies (of 1 total)

The topic ‘post_date_gmt in widget code’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 1 participant
 * Last reply from: [dylanvanderheij](https://wordpress.org/support/users/dylanvanderheij/)
 * Last activity: [14 years, 9 months ago](https://wordpress.org/support/topic/post_date_gmt-in-widget-code/#post-2280769)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
