I want an ical feed of events for a WP site I’m building and I came across this plugin called iCal Posts that does just that except that it hasn’t been updated in 3 years and so can’t grab posts from a specific category.
I was able to update it to grab posts from a certain category, but for some reason it is grabbing all the revisions too. Is there something I’m doing wrong here?
$posts = $wpdb->get_results(" SELECT wposts.*, UNIX_TIMESTAMP(post_date) AS post_date FROM $wpdb->posts AS wposts LEFT JOIN $wpdb->postmeta AS wpostmeta ON wposts.ID = wpostmeta.post_id LEFT JOIN $wpdb->term_relationships ON (wposts.ID = $wpdb->term_relationships.object_id) LEFT JOIN $wpdb->term_taxonomy ON ($wpdb->term_relationships.term_taxonomy_id = $wpdb->term_taxonomy.term_taxonomy_id) WHERE wposts.post_status = 'publish' AND wposts.post_type = 'post' AND $wpdb->term_taxonomy.taxonomy = 'category' AND $wpdb->term_taxonomy.term_id IN($category_id) ORDER BY post_date ASC $limit;");
- The topic ‘I'm trying to update the iCal Posts plugin’ is closed to new replies.