Extra metadata for media items
Extra metadata for media items
Extra metadata for media items
In media library, the images are listed using mysql query which retrieves from your posts table. So it won’t display the folders and sub folders in it. You can create categories and taxonomies to maintain it. If you wish to use plugins. Try some media management plugins. I can suggest you. enhanced media library, media … Read more
This plugin finds the image files which have not been used within a post or page and displays them for deletion from both your uploads directory and database. Images you have uploaded and used in other area’s of your site will also be displayed. Only problem is it hasn’t been updated in a while. WordPress … Read more
Like most page loads in WordPress, WP_Query is intimately involved meaning pre_get_posts is your friend. Proof of concept: function step_2($qry) { $qry->set(‘post__not_in’,array(468,303)); } function step_1() { add_action(‘pre_get_posts’,’step_2′); } add_action(‘load-upload.php’,’step_1′); I’m using the load-upload.php hook to isolate the filter to the “Library” page. If you’ve changed the uploads folder for your avatars you’ve already got some … Read more
You can try the following function to insert image to a post. Note: The following function will not make the image “featured image”. It will just uploaded the image and attach it to the post. It will return the attachment id if the upload is successful function insert_post_media( $post_id, $url){ $tmp = download_url( $url ); … Read more
A quick and easy way would be to just run a search on your WordPress site on the name of the image. E.g. your-image.png. This should return a list of all the posts which have that image in it.
I would check the upload_path upload_url_path under your admin options. I suspect they are still referencing the other website. Go to https://yourdomain.com/wp-admin/options.php and scroll down till you get to the the upload_path and upload_url_path.
Resetting the permissions on the uploads folder to 777 via ftp worked. or contact with your domain server for the problem, may max upload size is limited
do you have a custom meta field associated with the image? if so place this in your functions.php: <?php $trim_length = 21; //desired length of text to display $custom_field = ‘your custom field key here’; $value = get_post_meta($post->ID, $custom_field, true); if ($value) { echo ‘<p>I want to use: ‘ . rtrim(substr($value,0,$trim_length)) . ‘…</p>’; } ?> … Read more
This is a bit out of context but I think you can approach it a little bit differently, you can limit access to default media library for roles below “admin” or “editor” depending on your setup. For instance you can block authors from uploading files to media library using the following code.. if ( current_user_can(‘author’) … Read more