How to restrict add media library only to images of the same post family?

You need to alter the query using posts_where and posts_join filters. function restrict_media_images_per_post_type($query) { add_filter(‘posts_where’, ‘media_posts_where’); add_filter(‘posts_join’, ‘media_posts_join’); return $query; } add_filter(‘ajax_query_attachments_args’, ‘restrict_media_images_per_post_type’); Change “WHERE” clause to restrict to specific post type to which selected post belongs to function media_posts_where($where) { global $wpdb; $post_id = false; $whitelist_post_type = array( ‘post’, ‘{custom post type}’ //change this … Read more

WP media upload issues

You could look here https://www.digitalocean.com/community/questions/wordpress-the-uploaded-file-could-not-be-moved-to-wp-content-uploads for some good answers.

Media Library not loading

This error is common but it can be caused by more than one issue. If you are using Chrome or FireFox it can be due to the extensions. Therefore try disabling all browser extensions or try form a different browser/PC. If you have an AdBlocker or Anti-virus software it may also cause that. Therefore try … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)