Home › Forums › Calendar Products › Event Aggregator › Add fixed category to facebook imported events
- This topic has 5 replies, 2 voices, and was last updated 11 years, 8 months ago by
Barry.
-
AuthorPosts
-
April 11, 2014 at 7:39 am #131156
Adrian Cumpanasu
ParticipantHi! I need to import all facebook events in a temporary category, instead of importing as draft. That way they are visible.
Any suggestions?April 11, 2014 at 12:32 pm #131368Barry
MemberHi, 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!
April 11, 2014 at 1:58 pm #131420Adrian Cumpanasu
ParticipantThanks 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
April 14, 2014 at 8:07 am #132295Adrian Cumpanasu
Participantsolved 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.
April 14, 2014 at 4:26 pm #132648Barry
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>
July 29, 2014 at 7:42 am #532759Barry
MemberHi! 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!
-
AuthorPosts
- The topic ‘Add fixed category to facebook imported events’ is closed to new replies.
