enable trash for media wordpress
- Go to your WordPress dashboard and click on "Appearance" and then "Editor".
- Select the "functions.php" file on the right-hand side.
- Add the following code at the end of the file:
add_action('init', 'enable_media_trash');
function enable_media_trash() {
$wp_customize->get_setting('blogname')
->transport = 'postMessage';
$wp_customize->get_setting('blogdescription')
->transport = 'postMessage';
}
- Click on the "Update File" button to save the changes.