‘post_limits’ Filter Breaking Meda Library?
-
Hi there,
I have set up a seemingly simple ‘post_limits’ filter to modify a single post_type and category’s RSS feed to display 200 items. This is so I can consume the feed on another site and to have more than the default 20 items – these are events from “The Event Calendar” plugin.
When I implement the code below on the parent site, the WordPress media library on the site fails to load. It is as if it is loading 200 items as well. When I remove the filter, the media library works correctly, and loads pages of 40 items.
Here is the code causing the issue. Could you please let me know if you see any problems with the filter?
function coh_custom_rss_page_size(){ if( ! is_admin() && is_feed( 'tribe_events' ) && is_category( 'community' ) ) { return 'LIMIT 0, 200'; } } add_filter( 'post_limits', 'coh_custom_rss_page_size' );
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘‘post_limits’ Filter Breaking Meda Library?’ is closed to new replies.