Profile Picture
-
Hi again ??
in the event-submit.php
i am tryng to show the organizator user profile picture.
code:
<?php if ( $organizer_fields ) : ?> <h2 class="section-title"><?php _e( 'Contact Information', 'wp-event-manager' ); ?></h2> <?php do_action( 'submit_event_form_organizer_fields_start' ); ?> <?php foreach ( $organizer_fields as $key => $field ) : ?> <fieldset class="fieldset-<?php esc_attr_e( $key ); ?>"> <label for="<?php esc_attr_e( $key ); ?>"><?php echo $field['label'] . apply_filters( 'submit_event_form_required_label', $field['required'] ?'<span class="require-field">*</span>' : ' <small>' . __( '(optional)', 'wp-event-manager' ) . '</small>', $field ); ?></label> <div class="field <?php echo $field['required'] ? 'required-field' : ''; ?>"> <?php if($field['label'] == 'Name' && $field['type'] == 'text' ) $field['value'] = wp_get_current_user()->display_name ?> <?php if($field['label'] == 'Profile Picture' && $field['type'] == 'file' ) $field['value'] = get_avatar(get_the_author_meta('ID')); ?> <?php get_event_manager_template( 'form-fields/' . $field['type'] . '-field.php', array( 'key' => $key, 'field' => $field ) ); ?> </div> </fieldset> <?php endforeach; ?> <?php echo nl2br ("\n \n \n"); ?> <?php do_action( 'submit_event_form_organizer_fields_end' ); ?> <?php endif; ?>
In detail here i have added this:
<?php if($field['label'] == 'Profile Picture' && $field['type'] == 'file' ) $field['value'] = get_avatar(get_the_author_meta('ID')); ?>
could help me to show the profile picture? it does nto work and give me back a misisng img
thansk a lot
The page I need help with: [log in to see the link]
Viewing 14 replies - 1 through 14 (of 14 total)
Viewing 14 replies - 1 through 14 (of 14 total)
- The topic ‘Profile Picture’ is closed to new replies.