Add fixed category to facebook imported events

Home Forums Calendar Products Event Aggregator Add fixed category to facebook imported events

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #131156
    Adrian Cumpanasu
    Participant

    Hi! I need to import all facebook events in a temporary category, instead of importing as draft. That way they are visible.
    Any suggestions?

    #131368
    Barry
    Member

    Hi, great question!

    You can certainly change the default status of imported events from draft to published by editing settings in the Events > Settings > Facebook screen – look for the setting labelled default status to use for imported events.

    In terms of adding them to a specific category that currently is not supported – great idea though, please do post this as a feature request – but if you want to go ahead and do this as a customization, you could.

    • When a new event is created a number of actions fire, including save_post_tribe_events
    • You can use this to ‘listen’ for new events being created
    • You can determine if they came through the Facebook importer by testing for the presence of a _FacebookID post meta field
    • At that point, you can proceed with assigning it to a category or not

    There may be a couple of different ways to approach this besides what I’ve outlined – definitely possible though and we’d also love to see a feature request here.

    Good luck!

    #131420
    Adrian Cumpanasu
    Participant

    Thanks a lot for your answers!
    there is a plugin: https://theeventscalendar.com/support/forums/topic/categorize-imported-events/

    If I set the id of the tribe category, it doesn’t do anything. How do i add to a tribe category? maybe it doesn’t work because I put the code in functions.php

    #132295
    Adrian Cumpanasu
    Participant

    solved first part:
    replaced the ‘category’ string here with ‘tribe_events_cat’: wp_set_object_terms( $post_id, {CATEGORY ID}, ‘category’, true );

    the second part is that the revision check is always false even if I edit an event from backend.

    #132648
    Barry
    Member

    <p>Sounds like you’re making progress! I’m afraid we can’t really help further with custom development tasks like this, but we can certainly leave this open if you want to post your final solution or any other info that you think might be useful for others along the way :-)</p><p>Good luck!</p>

    #532759
    Barry
    Member

    Hi! It’s been a while so I’m going to go ahead and close this thread. If we can help with anything else, though, please don’t hesitate to create new threads as needed. Thanks!

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Add fixed category to facebook imported events’ is closed to new replies.