fbpx
Join our webinar on how to grow your events business with WP Event Manager on 29th September at 11:00 am EST.Register Now!
How can we help?

How to allow organizers to add images in the description box

How to allow organizers to add images in the description box on the submit event page?

In order to allow the organizers to add images while submitting the event in the description box, from the frontend, you need to add the below-mentioned code in functions.php and add upload image capability to thie organizer role.

add_action( 'admin_init', 'allow_organizer_uploads' );
function allow_organizer_uploads()
{
	$organizer = get_role('organizer');
        $organizer->add_cap('upload_files');
}

add_filter( 'submit_event_form_wp_editor_args', 'wpem_submit_event_form_wp_editor_args', 10 );
function wpem_submit_event_form_wp_editor_args($args)
{
	$args['media_buttons'] = true;

    return $args;
}
Quick Links
Close