New answers tagged

0

I found the problem :) Actually this is my friend's website. I don't have any idea how he changed the upload dir but I noticed that there is no define( 'UPLOADS', ''.'uploads' ); in his wp-config.php file. I added it and it's now working perfectly. I hope this helps other people who will facing this problem.


0

If you check the documentation for media_sideload_image() it returns HTML img tag for the image right away. Alternately it can return just the URL. Note that while this is suitable for immediate use, it's generally challenging to go back from URL to attachment ID. IDs are much more friendly for many things, such as being stored, processed, used to access ...


0

Currently, media organisation is possible. The "problem" with the media library in wordpress is always interesting. Check the following plugin to solve this: WordPress Real Media Library. WP RML creates a virtual folder structure based on an own taxonomy. It allows you to organize your wordpress media library in a nice way with folders. It is easy to use,...


2

When you create an attachment, do the following: If attachments parent ID is for a post with an excluded post type, do nothing If it isn't in the list of excluded post types, assign it a tag in a hidden custom taxonomy e.g. function create_hidden_taxonomy() { register_taxonomy( 'hidden_taxonomy', 'attachment', array( ...


2

Media items are just like posts with post_type = attachment and post_status = inherit. when we are on upload.php page, we have two views: List View Grid View Grid view is populated via JavaScript and list view is extending normal WP_List_Table. Since it (List view) is using normal post query we can use pre_get_posts to alter the query to hide required ...


0

Try deactivating the plugin "Login-Log". That worked for me. If thats not it just disable all plugins and see if that helps. If so you just have to test which one brakes grid view for you.


2

WordPress has some standard images thumbnail,medium,medium_large,large for which image sizes you can set it under Settings --> Media except medium_large size whose default height set to 768px ( medium_large is available from WP4.4). So when you set 0 to in the media settings it won't generate thumbnail,medium size,large size images and it didn't as far ...


0

I have the exact same problem. The closest solution I can think of is a little hacky, and it definitely is not great if you will be doing this import often. My solution is to use WP All Import to import new posts for each image, so that each image gets uploaded to your media library. This will also create 5000 garbage posts, but you can delete them ...



Top 50 recent answers are included