Ajaxify calendar

Write your required javascript, then use this code to display it on the page, it ensures that the script is only included if the calendar is displayed add_filter(‘get_calendar’, ‘add_calendar_scripts’); function add_calendar_scripts($content) { add_action( ‘wp_footer’, ‘output_calendar_scripts’, 11); return $content; } function output_calendar_scripts() { ?> <script type=”text/javascript” src=”https://wordpress.stackexchange.com/questions/70078/<?php echo get_template_directory_uri();?>/path/to/script.js”></script> <?php }

Loop through posts of a custom-post-type (event) and create .ics (iCal) file?

This is entirely based on Event Organiser (a plug-in I’ve developed). The code is lifted almost straight from the source but with alterations. As such I’ve not tested the code as given. Step 1: Create a feed This is simple: add_action(‘init’,’wpse63611_add_events_feed’); function wpse63611_add_events_feed(){ add_feed(‘my-events’,’wpse63611_events_feed_output’); } This adds a feed to your site: www.site.com?feed=my-events or www.site.com/feed/my-events … Read more

WP_Query meta_query results date by date

My idea is following. 1. Get the array of all meta dates your events have. DISTINCT in the MySQL query means do not include duplicates. <?php /* * From https://wordpress.stackexchange.com/a/9451/11761 */ function get_all_possible_meta_dates( $key = ‘event_dates_wp’, $type=”page”, $status=”publish” ) { global $wpdb; $result = $wpdb->get_col( $wpdb->prepare( ” SELECT DISTINCT pm.meta_value FROM {$wpdb->postmeta} pm LEFT JOIN … Read more

Event Calendar on hosted wordpress?

It may be time to give up WordPress.com. There is little day to day difference in managing a self-hosted version, but there is a world of opportunities that will open with a few well selected plugins. You mentioned you’re volunteering for an organization. If the issue is paying for hosting, Dreamhost and HostGator offer free … Read more

Dynamic iCal generator outside/inside wordpress

I would use WordPress’ feeds. You can create your own feed with add_feed. You specify a callback and this callback is responsible for displaying the output. Creating a feed add_feed(‘my-events’,’wpse56187_ical_cb’); wpse56187_ical_cb is that responsible for getting the events (use WP_Query), looping through them and printing the ICAL fields. Downloading the ICAL file If your feed … Read more

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