fbpx

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 code in functions.php and add upload image capability to the organizer role.

<?php
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;
}
?>
Was this article helpful?
How can we improve this article?
Quick Links