WordPress.org

Ready to get started?Download WordPress

Forums

Events Manager
[resolved] Category information Location - where is it stored? (3 posts)

  1. LCrane86
    Member
    Posted 1 year ago #

    Hi,

    I'm still working on the mobile app, but after looking through the SQL backend, I can't find where the category information is found.

    The obvious place would be in the events table, but all the event_category_id fields are empty. I see event-categories are listed in wp_term_taxonomy table - how can I grab events by category from an SQL query?

    I've seen someone offering this code,

    SELECT * FROM wp_em_events WHERE event_category_id = 1 ORDER BY event_start_date ASC

    But, obviously with my event_category_id's being NULL, I'm wondering how I can pull this information so I can push it out for mobile use?

    Thanks

    Laura

    http://wordpress.org/extend/plugins/events-manager/

  2. agelonwl
    Member
    Posted 1 year ago #

    maybe this sample snippet will help - http://pastebin.com/uLEak8Q5

  3. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 1 year ago #

    categories are custom taxonomies now, some fields were left over from version 4 before we started using custom post types.

    so you'd be using WP functions to find this.

    ideally the best way would be to use our functions, which take care of this for you:

    $events = EM_Events::get(array('category'=>'x'));

    you now have an array of EM_Event objects to work with.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic