Single Events as Sub-Page to Main Calendar Page

I’ll preface this by saying I have no experience with or knowledge of the plugin, this answer is based entirely on a 30 second scan of the code that registers the post type for use in the plugin, so you may uncover issues with this solution that my quick clicking of a test event didn’t … Read more

sort and display posts by custom field (wp-query and the loop))

I believe the meta_query part should be a nested array, so your query should be like this: $query = new WP_Query( ‘post_type’ => ‘post’, ‘orderby’ => ‘meta_value’, ‘meta_key’ => ‘ENDS’, ‘order’ => ‘ASC’, ‘posts_per_page’ => -1, ‘meta_query’ => array( array ( ‘key’ => ‘ENDS’, ‘value’ => date(‘Y-m-d H:i:s’), // now ‘compare’ => ‘>=’, ‘type’ => … Read more

FYI: How to make Time.ly all-in-one event calendar mobile friendly [closed]

How to make Time.ly all-in-one event calendar mobile friendly Anyway, now down to the actual “mobile” part of things. After creating a wonderfully responsive website for Tahlequah Public Schools and installing this awesome calendar plugin, I found I had an issue with the site being mobile-friendly still… My calendar looked awful on mobile: it displayed … Read more

List of all entries of custom-post-type: Add year-parameter?

I’ve modified above function somewhat function get_event_list( $latest = true, $order=”ASC”, $return = false, $year ) { // Pass year i.e $year $enddate = strtotime($year.”-12-31″); // year’s last date $startdate = strtotime( ($year-1).”-12-31″); year’s first date $yesterday = array($startdate, $enddate ); // Fetch posts between these dates $compare=”BETWEEN”;// Between above two dates $current_year=””; $args = … Read more

Issue with wp_schedule_event()

You need to schedule the event differently. In your approach, you hook to wp to schedule the event, meaning that it is called everytime WordPress is called, setting your option back. I am not quite sure if the schedule is postponed or if you create multiple schedules this way, but it is not correct. You … Read more

Show only the future event (Advanced Custom Fields)

You need a meta query. There’s also documentation on ACF for querying dates. <?php $event = new WP_Query( array( ‘post_type’ => ‘gacr-event’, ‘posts_per_page’ => 5, ‘orderby’ => ‘meta_value_num’, ‘order’ => ‘DESC’, ‘meta_query’ => array( array( ‘key’ => ‘date’, ‘type’ => ‘NUMERIC’, // MySQL needs to treat date meta values as numbers ‘value’ => current_time( ‘Ymd’ … Read more

Pass argument to event hook

I would suggest first read the wordpress documentation about actions to understand how they work. Actions are aplit into two section, add_action and do_action do_action is the “location” where you hook into it. A basic example of do_action do_action(‘my_custom_action’); You can also pass arguments into do_action which can be available in add_action if you choose … Read more

Keyup events in tinymce editor not working

You can create a new plugin with the mce_external_plugins filter.. and link it to a js file. Then, in that file you can do your processing. function tinymce_init() { // Hook to tinymce plugins filter add_filter( ‘mce_external_plugins’, ‘tinymce_plugin’ ); } add_filter(‘init’, ‘tinymce_init’); function tinymce_plugin($init) { // We create a new plugin… linked to a js … Read more