Title: ian72's Replies | WordPress.org

---

# ian72

  [  ](https://wordpress.org/support/users/ian72/)

 *   [Profile](https://wordpress.org/support/users/ian72/)
 *   [Topics Started](https://wordpress.org/support/users/ian72/topics/)
 *   [Replies Created](https://wordpress.org/support/users/ian72/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/ian72/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/ian72/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/ian72/engagements/)
 *   [Favorites](https://wordpress.org/support/users/ian72/favorites/)

 Search replies:

## Forum Replies Created

Viewing 7 replies - 1 through 7 (of 7 total)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[AddToAny Share Buttons] Chrome says about problem with plugin’s cookie](https://wordpress.org/support/topic/chrome-says-about-problem-with-plugins-cookie/)
 *  [ian72](https://wordpress.org/support/users/ian72/)
 * (@ian72)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/chrome-says-about-problem-with-plugins-cookie/#post-12083953)
 * Subscribed
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WordPress Slider Block Gutenslider] Heading background color](https://wordpress.org/support/topic/heading-background-color/)
 *  Thread Starter [ian72](https://wordpress.org/support/users/ian72/)
 * (@ian72)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/heading-background-color/#post-12083926)
 * Hi [@eedee](https://wordpress.org/support/users/eedee/)
    The text-colour is just
   fine, it plays happily with my custom palette too. I cannot set a background 
   colour on Headings, it does not show up in the options when selected. Paragraphs
   allow you to set text colour and background colour Thanks
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Facebook Events Importer] Errors on Importing Page Events ?](https://wordpress.org/support/topic/errors-on-importing-page-events/)
 *  [ian72](https://wordpress.org/support/users/ian72/)
 * (@ian72)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/errors-on-importing-page-events/#post-5986039)
 * Yup, me too.
    WordPress 4.1.1 PHP Version 5.4.39
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Meta Box] clone fields issue](https://wordpress.org/support/topic/clone-fields-issue/)
 *  [ian72](https://wordpress.org/support/users/ian72/)
 * (@ian72)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/clone-fields-issue/#post-3167600)
 * Me too.
    My select drop down pulls from a custom taxonomy list. When there’s 
   one select box, the update works fine. However, if I clone this select box, select
   a value for each one and then update the record, the value ‘Array’ is inserted
   into the custom taxonomy list and the chosen values are not remembered in the
   select boxes. Subsequent select boxes then get themselves in a twist too as the
   values from each select box are mixed up.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Events Manager - Calendar, Bookings, Tickets, and more!] [Plugin: Events Manager] Too many events?](https://wordpress.org/support/topic/plugin-events-manager-too-many-events/)
 *  Thread Starter [ian72](https://wordpress.org/support/users/ian72/)
 * (@ian72)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/plugin-events-manager-too-many-events/#post-3089785)
 * I’ve done as suggested but Im still not deleting the previous events properly.
 * You were pretty much bang with the statements apart from the first DELETE statement.
   because object_id doesn’t exist as a column in wp_em_events
    Am I missing something
   here?
 * Although this has deleted a whole bunch of stuff (see below) I still have lots
   of previous events showing in the admin.
    So, I looked at the post_id in WordPress
   for one of the previous events, and can see that there are still many instances
   in wp_postmeta with the related post_id. They have not been deleted properly.
   Looking at the sql calls, I don’t think the logic is quite right, but Im too 
   daft to work out the right thing. It would help if I knew which tables were in
   operation – is wp_em_events even still in the mix? Thought wp_posts had taken
   over.
 * For the record here’s what I did
    *I tried all these out first replacing DELETE
   with SELECT * to check the syntax was OK and the tables existed etc.
 * 1.
 *     ```
       DELETE
       FROM wp_postmeta
       WHERE post_id
       IN (
       SELECT post_id
       FROM wp_em_events
       WHERE event_end_date < NOW( )
       AND recurrence_id >0
       )
       ```
   
 * Deleted rows: 25785 (Query took 5.9513 sec)
 * 2.
 *     ```
       DELETE
       FROM wp_posts
       WHERE ID
       IN (
       SELECT post_id
       FROM wp_em_events
       WHERE event_end_date < NOW( )
       AND recurrence_id >0
       )
       ```
   
 * Deleted rows: 849 (Query took 0.1698 sec)
 * 3.
 *     ```
       DELETE FROM wp_em_events WHERE event_end_date < NOW() AND recurrence_id > 0
       ```
   
 * Deleted rows: 887 (Query took 0.1382 sec)
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Events Manager - Calendar, Bookings, Tickets, and more!] [Plugin: Events Manager] Too many events?](https://wordpress.org/support/topic/plugin-events-manager-too-many-events/)
 *  Thread Starter [ian72](https://wordpress.org/support/users/ian72/)
 * (@ian72)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/plugin-events-manager-too-many-events/#post-3089651)
 * Hey Marcus, thanks for replying.
 * For events that HAVE passed, but are still part of a recurring set of events 
   that have NOT completely passed, I get the impression that I have to Detach the
   event before I can bulk delete or the whole lot get deleted?
 * SQL- I’m looking to delete events that with an end_date before a specific date(
   today for example) and as a separate query, events whose start_date is after 
   a certain date (next year for example)
 * Before I realised EM’d changed to custom posts (doh!), I was doing something 
   like this in phpMyadmin
 *     ```
       DELETE FROM em_events WHERE  event_end_date < 2012-10-03
       ```
   
 * and
 *     ```
       DELETE FROM em_events WHERE event_start_date > 2013-10-03
       ```
   
 * Cheers
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Plugin: Events Calendar] What’s wrong with my Event Calendar ?](https://wordpress.org/support/topic/plugin-events-calendar-whats-wrong-with-my-event-calendar/)
 *  [ian72](https://wordpress.org/support/users/ian72/)
 * (@ian72)
 * [18 years, 1 month ago](https://wordpress.org/support/topic/plugin-events-calendar-whats-wrong-with-my-event-calendar/#post-779413)
 * I had the same `Warning: file_get_contents():` problem and how now resolved it
   using CURL instead. I don’t really know what CURL is, but this worked for me.
   This might not work on your host, but worth a try if you’re in limbo.
 * Open ec_calendar.class.php
    On line 42 comment out the file_get_contents bit 
   like so: `//$ecData = file_get_contents($ecFile);`
 * and underneath it put:
 *     ```
       $ch = curl_init();
       $timeout = 5; // set to zero for no timeout
       curl_setopt ($ch, CURLOPT_URL, $ecFile);
       curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
       curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
       $ecData = curl_exec($ch);
       curl_close($ch);
       ```
   
 * That’s all.
    Hope that helps someone.

Viewing 7 replies - 1 through 7 (of 7 total)