Support » Developing with WordPress » Custom media file Directory for Custom WP editor

  • How To achieve the functionality of moving/uploading the attachement files into separate folders when the user clicks the “Add Media” button in the Custom WordPress editor.

    <div class="form-row">
    	<div class="form-group col-md-12">
    		<label for="custom_description">
    			<?php esc_html_e( 'Event Description', 'event-management' ); ?>:
    		</label>
    		<?php
    
    		$settings = array(
    			'media_buttons' => current_user_can( 'upload_files' ) ? true : false,
    			'textarea_name' => 'description',
    			'textarea_rows' => 10,
    			'wpautop'       => false,
    			'editor_id'     => 'description',
    						);
    
    		wp_editor( stripslashes( $description ), 'custom_description', $settings );
    		?>
    
    	</div>
    </div>
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.