Forums

post_date_gmt in widget code (2 posts)

  1. dylanvanderheij
    Member
    Posted 1 year ago #

    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. Please use the pastebin]

    Code of widget:
    [Code moderated.]

  2. dylanvanderheij
    Member
    Posted 1 year ago #

    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..

Topic Closed

This topic has been closed to new replies.

About this Topic