Skip to content

Instantly share code, notes, and snippets.

@nciske
Created June 17, 2014 17:28
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save nciske/44d0e9426db4ff09959b to your computer and use it in GitHub Desktop.
<?php
function email_feed_post_limit( $limit, $query ) {
if ( ! is_admin() && $query->is_feed() && isset( $_GET['email'] ) && $_GET['email'] ) {
return 'LIMIT 0, 10';
}
return $limit;
}
add_filter( 'post_limits', 'email_feed_post_limit', 10, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment