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

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