Media not displaying other users uploads – WordPress 4.9.2
Media not displaying other users uploads – WordPress 4.9.2
Media not displaying other users uploads – WordPress 4.9.2
I was able to fix this problem by using this code instead of the one above: define(‘WP_CONTENT_DIR’, $_SERVER[‘DOCUMENT_ROOT’] . ‘/wp-content’); define(‘WP_CONTENT_URL’, ‘http://’ . $_SERVER[‘HTTP_HOST’] . ‘/wp-content’);
Haven’t been able to figure this one out, so I’m going to go ahead and close it. Seems to be localized to a specific computer/user account.
Replace Swedish characters in filenames
Showing added mime types in REST media response
TwentySeventeen $content_width not updated in admin
Frontend media shows “An error occurred in the upload. Please try again later.”
Here is the solution i’ve found : in wordpress-importer plugin function process_posts : // try to use _wp_attached file for upload folder placement to ensure the same location as the export site // e.g. location is 2003/05/image.jpg but the attachment post_date is 2010/09, see media_handle_upload() $postdata[‘upload_date’] = $post[‘post_date’]; if ( isset( $post[‘postmeta’] ) ) { … Read more
Media library and Upload media problem
to test the post type where the image is included, try that : add_filter(“media_send_to_editor”, function ($html, $attachment_id, $attachment) { $image = get_post($attachment_id); $post = get_post($image->post_parent); if (“CUSTOM_POST_TYPE_CODE” === $post->post_type) { } return $html; }, 10, 3);