Please note, during initial purchase of plugin, its possible to select (or deselect) optional subscription (billing each 6 months) for getting Updates and Support for plugin. Optional subscription of getting updates. You can request free updates your version of Booking Calendar (if such updates ready) during 6 months after initial purchase of plugin. You can request new update of Booking Calendar on this page. If you was not selected subscription of getting "Updates and Support" during initial purchase, and if you will need (in a future) to extend period of support and getting updates to next 6 months, it will cost 50% from the original cost (original cost - its cost of Booking Calendar version without other discounts). Possible to cancel subscription of getting updates at any time. First 6 month during initial purchase of plugin, getting of updates is for free. Please note, during initial purchase of plugin, its possible to select (or deselect) optional subscription (billing each 6 months) for getting Updates and Support for plugin with additional discount. Optional subscription of getting updates with discounted cost. If you will need to extend period of support and getting updates to next 6 months, it will cost 50% from the original cost of your Booking Calendar version (original cost - its cost of Booking Calendar version without other discounts). You can use your purchased version of Booking Calendar as long as you need on your website.Īlso, you can request free updates your version of Booking Calendar (if such updates ready) during 6 months after initial purchase of plugin. Dates do not have to be entered in order (but when you next edit the event it probably should be presented in order).It's one time cost. The benefits of this approach is performance (index the columns) - particular for complex date queries. This is, in a nutshell, what Event Organiser does. You'll then need to alter the SQL query to LEFT JOIN this table onto the posts table using the post ID and wp_posts.ID columns. I would recommend approach creating a separate table for events, of the form: date ID | post ID | timestamp In addition if you edit/remove date this may mean you need to readjust the key-value pairings of the later dates. And you've already listed a flaw with this approach. Architecturally its just messy, and you'll suffer performance wise. While not all event management plug-in support arbitrary date, most will have the other features.īut any case, if you wanted to roll your own I strongly recommend against using post meta. Plug-in recommendations are off-topic here, but (and at the risk of bias), I've developed Event Organiser which allows you select arbitrary dates / recurring events, and list them. * use: array_msort($array, array('name'=>SORT_DESC, 'cat'=>SORT_ASC)) įoreach ($array as $k => $row) output in order, with whatever meta/stuff you wantĮcho ''.get_the_title($event).'' Įcho ''.date('m/d/Y', $event).'' Įcho get_post_meta($event, 'some_meta_stuff', true) $events_sorted = array_msort($events_out, array('timestamp' => SORT_ASC)) use array_msort to sort by date! defined below save into outter array with post_id so we can ref more data $instances = get_post_meta($post->ID, 'dateC', true) $instances = get_post_meta($post->ID, 'dateB', true) $instances = get_post_meta($post->ID, 'dateA', true) While($loop->have_posts()) : $loop->the_post() assume you already have your loop built the way you want Here you go, explanations as comments // setup array to store things in while we loop Any pointers would be greatly appreciated! So basically what I need to (somehow) do is:ĭisplay the future events chronologically by the event date.Ĭan this be done, and if so, how would I approach it. This requires all dateB's to be after the last dateA. Loop through the events multiple times, first loop displaying theĮvents with dateA, second loop displaying events with dateB etc. There are a couple of easy ways to do this, but they have major flaws:Ĭreate separate events for each date, but this would be a I want to display all the event-date combinations on a page chronologically after checking if the date is in the future. Each event can take place multiple times per year, so I have custom fields for the dates, let's say 'dateA', 'dateB', 'dateC'. I've been breaking my head over this for days now and can't seem to figure it out (with the limited knowledge I have).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |