Delete events by custom field date

Home Forums Bulk Delete Addons Delete Posts by Custom Field Delete events by custom field date

We have replaced our forums with email based support system.

Please open a support ticket from our new support page.

This topic contains 9 replies, has 2 voices, and was last updated by  Sudar 6 years, 9 months ago.

  • Author
    Posts
  • #11429

    Mark van der Zande
    Participant

    Hiii I want to delete events that are already happened in the past.

    This is my custom field:

    event_ends

    This is the output of a field: 2017-07-02T12:00:00+0200

    I want to delete the posts that has a date in the past. How can I do this?

    value must then be less then (today)

  • #11431

    Sudar
    Keymaster

    Hello Mark,

    In the “Delete Posts by Custom Field” module, select the following options.

    – ‘event_ends’ as meta key
    – “less than (date)” as comparison operator
    – today’s date 2017-07-02
    – The following as the format YYYY-MM-DD

  • #11443

    Mark van der Zande
    Participant

    It dont work see:

    Deleted 0 posts using the selected custom field condition

  • #11452

    Mark van der Zande
    Participant

    ???

  • #11461

    Mark van der Zande
    Participant

    hello????

  • #11468

    Sudar
    Keymaster

    Hello Mark,

    Apologies for the delay in getting back to you.

    I assumed you were using the ‘The Events Calendar’ plugin.

    Please let me know which plugin you are using for creating events so that I can get you the exact steps.

  • #11469

    Mark van der Zande
    Participant

    Facebook Events Importer PRO

  • #11471

    Sudar
    Keymaster

    Hello Mark,

    Looks like the “Facebook Events Importer” plugin is creating a custom post type to store the events.

    While deleting the posts did you choose ‘facebook events’ as the post type?

    Please send me the screenshot of all the options that you choose while trying to delete the posts.

    Also please post the screenshot of the row in the wp_postmeta table in your database that has the meta_key ‘event_ends’.

    I will try my best to resolve this issue for you.

  • #11472

    Mark van der Zande
    Participant

    Yeah of course!

    See screenshots

    Attachments:
    You must be logged in to view attached files.
  • #11486

    Sudar
    Keymaster

    Hello Mark,

    In the “Delete Posts by Custom Field” module, select the following options.

    – ‘facebook_events’ as post type
    – ‘event_ends’ as meta key
    – ‘less than (date)’ as comparison operator
    – today’s date 2017-07-06T12:00:00+0200
    – Date format as empty

    Let me know if you still face any issues with this.

The forum ‘Delete Posts by Custom Field’ is closed to new topics and replies.