Display upcoming events in the next 30 days by querying posts with timestamp in custom meta

I recently did exactly the same, you’ll have to use custom query: $date = time()-86400; /* today */ $querystr = ” SELECT $wpdb->posts.* FROM $wpdb->posts, $wpdb->postmeta WHERE $wpdb->posts.ID = $wpdb->postmeta.post_id AND $wpdb->posts.post_status=”publish” AND $wpdb->postmeta.meta_key = ‘event_date’ AND $wpdb->postmeta.meta_value > ” . $date . ” ORDER BY $wpdb->postmeta.meta_value ASC “; $pageposts = $wpdb->get_results($querystr, OBJECT); foreach ($pageposts … Read more

Creating an Events Feed with Sub Pages/Posts for Each Event

when you create a custom post type, and make it hierarchical, it will behave like pages. so you can have sub events the same way you have sub pages. look at register_post_type function arguments here : http://codex.wordpress.org/Function_Reference/register_post_type#Arguments then use wp_list_pages function to list subpages. see : http://codex.wordpress.org/Function_Reference/wp_list_pages#List_members_of_a_custom_post_type something like this (not tested) : <?php $args … Read more

Plugin: Events manager – Next and previous event

The function WordPress ultimately uses for this is get_adjacent_post(), which has filters that allow you to modify the query directly. You’d have to modify the JOIN, WHERE and ORDER BY clauses to join the post meta table and order by your custom field. Another option is the Ambrosite Next/Previous Post Link Plus plugin.

Event booking form for wordpress

That’s quite a specific criteria- there are numerous event management plug-ins out there with bookings built in, but none will provide exactly what you are after. In general they will all have some form of date-picker (usually jQuery datepicker) – that’s because in general people will want to manually select dates. My suggestion is to … Read more

Event Archive by Month

Ok short of a better solution here is what I’ve come up with: <?php $today = date(‘Y-m-d’, strtotime(‘-6 hours’)); query_posts(array( ‘post_type’ => ‘events’, ‘posts_per_page’ => 99, ‘meta_key’ => ‘event_date’, ‘orderby’ => ‘meta_value’, ‘order’ => ‘ASC’, ‘meta_query’ => array(array( ‘key’ => ‘event_date’, ‘meta-value’ => $value, ‘value’ => $today, ‘compare’ => ‘>=’, ‘type’ => ‘CHAR’ )) )); … Read more

Order posts of a custom post type by the event date using FT Calendar Plugin

My guess is that the calendar date is some sort of meta field for the custom post type. I’d find that out and add that as a variable for my query. You might be able to use something like this <?php $loop = new WP_Query( array( ‘post_type’ => ‘events’, ‘meta_key’=>’start_datetime’, ‘orderby’ => ‘meta_value’, ‘order’ => … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)