Additional fields for Venues and Organizers

Home Forums Calendar Products Community Events Additional fields for Venues and Organizers

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1029044
    Uroš
    Participant

    Hi,

    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!

    #1029337
    Brian
    Member

    Hi,

    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

    #1029663
    Uroš
    Participant

    OK, thanks!
    Looking forward for the new snippet.

    #1029763
    Brian
    Member

    Hi,

    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.

    http://tribe.uservoice.com/

    Cheers

    #1075756
    Support Droid
    Keymaster

    This 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.

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Additional fields for Venues and Organizers’ is closed to new replies.