wp_delete_attachment doesn’t delete image files / doesn’t work
wp_delete_attachment doesn’t delete image files / doesn’t work
wp_delete_attachment doesn’t delete image files / doesn’t work
just a guess: maybe a thumbnail regenerator plugin will work in combination your sanitize plugin. like this regenerate-thumbnails or this force-regenerate-thumbnails
This is how I resolved it: $myNewImg = get_post_meta($id, ‘usp-file-single’, true); if (isset($_POST[‘uploadImgCustom’])) { $myNewImg = $_POST[‘uploadImgCustom’]; } $attachments = get_posts(array(….
How to upload 3 attachments to current post?
What is the hook to obtain the path and the name of the file that is being uploaded?
you need to allow them to be uploaded in your media files. you can add following code to your themes functions.php and it should work. function my_mime_types($mime_types){ $mime_types[‘ged’] = ‘application/octet-stream’; return $mime_types; } add_filter(‘upload_mimes’, ‘my_mime_types’, 1, 1); there is more information about adding new mime types in WP here: https://wpsmackdown.com/add-remove-filetypes-wordpress-media-library/#add-filetypes Here is an info about … Read more
Can you generate a featured image from two images from custom fields?
WordPress upload folder stuck in 2017
Editor User Role can’t see other users media
Currently I’ve achieved a somewhat acceptable solution by using the do_shortcode_tag filter as mentioned in this answer, and using get_post_meta to fetch the value, as mentioned in this answer. There are (at least!) two caveats, however: The id in do_shortcode_tag‘s $attr isn’t the attachment post ID, but rather the CSS id from the original shortcode. … Read more