Set default category for Facecbook Importer

Home Forums Calendar Products Event Aggregator Set default category for Facecbook Importer

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #949987
    tkwalker
    Participant

    Hi, I noticed that the Facebook Importer doesn’t assign a category to the events. How would I go about assigning a default category “entertainment” to all events fetched from this importer? Currently, I would have to manually go in and set each event to a category versus having a default assignment during the import.

    Any help would be great.

    Thanks,
    TK

    #950043
    Brian
    Keymaster

    Hi,

    Thanks for using Facebook Events.

    It is not a feature to set a category on import.

    If you would like to request that feature please head to our UserVoice Page and add your own or upvote that feature as they will increase the chances of it being added to a future version.

    http://tribe.uservoice.com/forums/195723-feature-ideas

    You can add a line of coding yourself to get it to add an Event Category. However, you will have to make the change on each update and the coding is not supported by us.

    If on this file:

    the-events-calendar-facebook-importer\the-events-calendar-facebook-importer.php

    After this section around line 711:

    // set the event's Facebook ID meta
    update_post_meta( $event_id, '_FacebookID', $args['FacebookID'] );

    You add this line:

    wp_set_object_terms( $event_id, 'facebook-events', 'tribe_events_cat', FALSE );

    That will add the event category you would like.

    Be sure to replace ‘facebook-events’ with the slug of the category you would like it to be.

    The Event Category should be created before you try to import a Facebook Event.

    Thanks

    #950202
    tkwalker
    Participant

    Thanks. This is a temporary fix for a bigger problem. Currently the plugin does not fetch event categories, leaving all the events uncategorized. It would be great if the plugin would look for the the “type” or “category” attribute and pull that information. If the category doesn’t exist, it could easily create it. Just a thought
    TK

    #950207
    Brian
    Keymaster

    Glad it helps. That does sounds like it would be a good feature to add to the plugin once we upgrade to the latest API.

    If you would like to request that feature please head to our UserVoice Page and add your own or upvote that feature as they will increase the chances of it being added to a future version.

    http://tribe.uservoice.com/forums/195723-feature-ideas

    Since this is marked resolved I am going to close this ticket, but if you need anything else related to this topic or another please post a new topic on the forum and we can help you out.

    Thanks

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Set default category for Facecbook Importer’ is closed to new replies.