As said in comments, it’s not a good idea editing WP core files. You can easily modify the query that displays your media posts by adding the following code to a plugin or your theme’s functions.php
add_filter( 'pre_get_posts', '_wp_media_pre_get_posts' );
function _wp_media_pre_get_posts( $wp_query ) {
global $pagenow;
if( ! in_array( $pagenow, array( 'upload.php', 'admin-ajax.php' ) ) )
return;
$wp_query->set( 'meta_query', array(
array(
'key' => 'meta_value',
'value' => '%cloudinary%',
'compare' => 'NOT LIKE'
)
) );
}
Related Posts:
- Authors list Pagination : result set from $wpdb->get_results()
- The paging is very slow under a large number of articles
- How can I paginate results from get_children
- Why Am I getting an error when I add the number parameter to my WP_User_Query?
- Media library only show 2 items per page?
- Changing pagination list class
- Pagination with custom SQL query
- Pagination resolving to first page only
- Pagination of RSS2 feed
- Pagination for sub-pages
- Modifying WP_LIST_AUTHOR Functions to output all users in a grid (and Paginate)
- Problem: ( kriesi ) pagination doesn’t work in homepage [duplicate]
- How to ignore or disable nextpage tag?
- category/category_name pagination 404 error
- get_query_var(‘paged’) giving same result
- Show content only on front page?
- Show next / previous text (button) all the time
- wordpress Next/Previous post in same category not working
- Pagination difficulty using custom query in genesis-based custom theme
- Placing Ads after every 10th Post with Infinite Scroll
- How to implement pagination in backward way eg. first – 20 – 19 – 18 – … – 3 – 2 – 1 – last
- WordPress Pagination not working, any ideas?
- Next & Previous (Pagination in this case) Not Appearing
- Limit Timber pagination number items
- List all posts by year with pagination
- WordPress wp_link_pages show only next/prev link
- Altering next_posts_link(); and previous_posts_link();
- Pass additional parameter in the URL
- Post timeline (pagination with date, not numbers)
- Why do next pages load the same content rather then older articles?
- How to disable pagination (next/previous links) on post type archive?
- Nested Pagination
- Pagination stopped working after assigning custom page template to new page (different slug)
- I want to remove numbers from the_posts_pagination function
- Wpdb result with pagination
- Yoast’s rel=“next” & rel=“prev” tag don’t work on static homepage’s paginated pages
- Invalid previous pagination links generated from paginate_links()
- Using paginate_links() to generate “01, 02, 03, 04” paginations
- Pagination not working on custom page
- 404 when using pagination in a category
- WP-PageNavi on Custom page template not working
- Wp-pagenavi giving page not found on clicking page 2
- Paginated Archives or Loop by Month
- Pagination Not Working on `WP_Query` Archive Page
- How can I change pagination numbers with next and back button?
- How do I make my pagination work?
- How to use custom previous/next link ?
- How to paginate a list of child pages
- Show content based on page number
- Pagination issue in archive.php
- How to use pagination?
- How to get category/tag in URL for Pagination links?
- Pagination on and tag.php not working
- Include a leading zero in pagination
- Pagination not work on page but work on category
- Can I use paginate_links() to add a pagination list, yet prevent it from inserting links?
- Custom category.php paging shows the same posts
- Page links are not working after moving domain [closed]
- Pagination Links showing incorrect previous page number
- How to limit page pagination… again
- Conditional pagination li’s
- Paginate Links – Mid Size Less Than 2
- Problem when I try to insert pagination
- Different page template for paginated content?
- tax_query does not work with pagination with custom query (both wp_query and query_posts())
- Pagination for multiple queries merging into one Loop
- paginate_comments_links() not working
- Adding paging to get_posts()
- Can I paginate this get_attachment query?
- paginate posts on admin page
- How to Show Next-Previous Link Only
- WordPress static home page pagination not working
- How to create a WordPress gallery with pagination
- Broken pagination links on WP 4.9.10 blog pages
- Excluding posts without affecting the number of posts per page
- get_next_posts_page_link adds Inexistent directories
- why pagination not working in page template
- Custom pagination in wp
- 404 page not found on pagination in home page while navigating to next page
- Only show pagination when post count exceeds show post
- Pagination – linking back to base page – Page 1
- Custom Pagination shows same posts on each page
- Numbered pagination showing all numbers instead of paginated blocks
- Show next and previous page number
- Search pagination link redirecting to a link that doesn’t work with pagination
- Custom Query & Rewritten URL Pagination 404
- Adding pagination to query for custom page
- Main page paginate_links issue
- Custom pagination generates title 404
- Removing template part when not on homepage if / else
- Paginate template name
- WordPress pagination URL posts not load
- How to reduce the number of pages in pagination
- Use cookies in pagination
- foreach pagination
- paged query leads to 404? [duplicate]
- Pagination only working on index page not on a template page
- How to change `page` slug in pagination? on a specific pagination result (not globally)
- Two pagination in one page without being synchronous
- Change “/” (slash) before page number in pagination path to “-” (hyphen)