Home › Forums › Calendar Products › Community Events › Additional fields for Venues and Organizers
- This topic has 4 replies, 3 voices, and was last updated 10 years, 1 month ago by
Support Droid.
-
AuthorPosts
-
November 21, 2015 at 7:59 am #1029044
Uroš
ParticipantHi,
I’ve been following your tutorial for creating Additional fields for Venues and Organizers.
Currently I wan’t to put one additional field to organizer, so I’ve pasted this code to my functions.php file/* Enable custom field support for organizer posts */ function tribe_organizers_custom_field_support( $args ) { $args['supports'][] = 'custom-fields'; return $args; } add_filter( 'tribe_events_register_organizer_type_args', 'tribe_organizers_custom_field_support' ); /* Outputs all WP post meta fields (except those prefixed "_"), feel free to tweak the formatting! */ function show_wp_custom_fields() { foreach ( get_post_meta( get_the_ID() ) as $field => $value ) { $field = trim( $field ); if ( is_array( $value ) ) $value = implode( ', ', $value ); if ( 0 === strpos( $field, '_' ) ) continue; // Don't expose "private" fields echo '<strong>' . esc_html( $field ) . '</strong>' . esc_html( $value ) . '<br/>'; } } // Hooks the above function up so it runs in the single organizer page add_action( 'tribe_events_single_organizer_after_the_meta', 'show_wp_custom_fields' );It all works OK and the field showed up at single organizer page, but the user can’t edit this field in frontend. I can only change the field in admin side.
Did I do something wrong?
Thanks for help!November 22, 2015 at 12:54 pm #1029337Brian
MemberHi,
Thanks for using our plugins. I can try to help out here.
Yes that snippet only works from the admin as with the change to enable multiple organizers per event.
Looking at your coding it does not appear there is a way to modify the snippet to work with the current version.
I will have the developers take a look and see if we can make it work again, but I do not have a timeline when that might happen.
Let me know if you have any follow up questions.
Thanks
November 23, 2015 at 7:39 am #1029663Uroš
ParticipantOK, thanks!
Looking forward for the new snippet.November 23, 2015 at 11:05 am #1029763Brian
MemberHi,
I looked again at this snippet and I do not believe it ever worked in Community Events to edit these fields from the front end.
It was just activate the additional fields in the admin and display those fields.
Unfortunately, after discussing this with our developers it is a feature request to add that to the plugin and not something we can do with a snippet.
If you think that is something you would like as a feature I encourage you to visit our User Voice Page and either upvote an existing request or make a new request there.
Cheers
February 18, 2016 at 8:31 am #1075756Support Droid
KeymasterThis topic has not been active for quite some time and will now be closed.
If you still need assistance please simply open a new topic (linking to this one if necessary)
and one of the team will be only too happy to help. -
AuthorPosts
- The topic ‘Additional fields for Venues and Organizers’ is closed to new replies.
