• I’ve created a custom post type “Events,” and one of the custom fields is “date”. I want to use query_posts grab all events occurring in a current week, whether or not they have passed. IE, a page will display all events occurring on Wednesday – Saturday of this week, even if it’s already Friday or Saturday.

    I can use the php function date(“W”) to get the current week of the year, but is there a way to use this with query_posts without having to create a second custom field where the contributer has to type in the week of the year manually? Can I add a “hidden” custom field that is filled in automatically by date(“W”) when the post is created?

    Thanks in advance.

The topic ‘Custom Post Type: Events, query_posts by week’ is closed to new replies.