Forum Replies Created
-
AuthorPosts
-
Oliver
ParticipantHi guys!
I also tried this, but only got back an empty array:
print_r(tribe_get_custom_fields( get_the_ID() ));Can someone give me a hint what’s wrong?
Best regards,
OliverOliver
ParticipantHi guys!
can you provide a fix for the issue or give me a hint, what data I have to remove in the DB?
Best regards,
OliverOliver
ParticipantHi Barry,
thanks for reopening this post and creating a bug report.
The tribe_create_venue() is not working the way as described in the documentation. It’s definitly a BUG, already described in July 2013:
Unfortunately it’s still not fixed in the current release! I recommend everybody not to use this function until the bug is fixed!!!Currently I’m using the following workaround:
I create the complete event including the venue. I hope this helps everybody who is dealing with the same problem.$venue = array();
$venue[‘Venue’] = $location;
$venue[‘post_type’] = ‘tribe_venue’;
$venue[‘EventCountry’] = ‘Deutschland’; // Documentation is wrong, it has to be EventCountry, not Country!
$venue[‘Address’] = $street;
$venue[‘City’] = $city;
$venue[‘State’] = ”;
$venue[‘Province’] = ”;
$venue[‘Zip’] = $zip;
$venue[‘ShowMap’] = true;
$venue[‘ShowMapLink’] = true;
$venue[‘Phone’] = $phone;
$venue[‘URL’] = $url;$event = array();
$event[‘post_title’] = $title;
$event[‘post_status’] = ‘pending’;
$event[‘post_type’] = “tribe_events”;
$event[‘post_content’] = $description;
$event[‘EventStartDate’] = $start_date; // YYYY-MM-DD
$event[‘EventEndDate’] = $end_date; // YYYY-MM-DD
$event[‘EventAllDay’] = ‘yes’; // Tribe documentation is wrong, it has to be “yes” or false !!!
$event[‘EventHideFromUpcoming’] = false;
$event[‘EventShowMapLink’] = true;
$event[‘EventShowMap’] = true;
$event[‘EventCost’] = ”;$event[‘Venue’]=$venue;
$post_id = tribe_create_event($event);
Best regards,
OliverOliver
ParticipantIn the wp_options table I found the following:
[…]
{i:0;s:2:”DE”;i:1;s:11:”Deutschland”;}s:18:”eventsDefaultPhone”;s:0:””;s:20:”tribeEventsCountries”;s:0:””;s:13:”custom-fields”;a:2:{i:0;a:4:{s:4:”name”;s:13:”_ecp_custom_1″;s:5:”label”;s:64:”Rechteinhaber / Name des Fotografen (bei Foto-Upload anzugeben!)”;s:4:”type”;s:4:”text”;s:6:”values”;s:0:””;}i:1;a:4:{s:4:”name”;s:13:”_ecp_custom_2″;s:5:”label”;s:68:”E-Mail Adresse für Rückfragen (Adresse wird nicht veröffentlicht)”;s:4:”type”;s:4:”text”;s:6:”values”;s:0:””;}}s:28:”organizer_venue_amalgamation”;i:1;}Which part exactly do I have to take out to remove the custom field “_ecp_custom_2”?
Oliver
ParticipantPS: I found this link with another (???) API:
http://plugins.trac.wordpress.org/browser/the-events-calendar/tags/3.0.1/lib/tribe-event-api.class.php#L12Is this API a possible solution? What’s the difference of the both APIs?
Oliver
ParticipantHi Barry,
thanks for the answer. I have three questions:
1. Is it possible to fill the $_POST array with additional data? If yes, which data is needed?
2. If no, can you post a piece of code or a link with an example for creating a venue via the WordPress API?
3. My second questions from the beginning of this thread isn’t discussed yet. Can you give me a hint how to make the link between the event and the venue work?Both parts are essiential as I need to migrate the data from our old productive system (Joomla) to the new (WordPress) with Events Calendar. We have several thousand events which needs to be imported in the new system. This can’t be done manually as you will understand 😉
Best regards,
OliverOliver
ParticipantI also tried, but it still doesn’t work.
if ($VenueID != false)
{
$my_post = array(
‘ID’ => $VenueID,
‘Venue’ => ‘Another title.’
);
wp_update_post( $my_post );Can you reproduce this problem on your side?
Oliver
ParticipantHi Barry,
yes I did (see code above):
$venue[“Venue”] = $location;
// $venue[“post_title”] = $location; // Doesn’t work neitherRegards,
OliverOliver
ParticipantI talked to my client. The custom field solution is fine for him,
but he wants to make the “Photo source field” a required field. Is it possible to add an option to the custom fields to make them a required field?Oliver
ParticipantDear Casey,
thanks you for the info. I will talk to my client if the solution with the additional field is fine for him. If not, I will use the UserVoice page. Maybe other users would like to have that feature, too.
Best regards,
OliverOliver
ParticipantThanks! That was exactly the documentation I was looking for 🙂
(I didn’t realized that the docu is splitted in Events Calendar and Events Calendar Pro).I included some of the functions which works in theory, but in the standard WordPress RSS feed (www.mydomain.com/feed) the events from “Events Calendar Pro” are not included. There are only the regular posts being feeded. Do I have to turn a special option on to see the events in the standard Worpress RSS feed?
-
AuthorPosts
