Skip to content

Instantly share code, notes, and snippets.

@eihabi
Created July 17, 2020 18:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eihabi/fe15483bc5467ea2cc016924cfd4ba75 to your computer and use it in GitHub Desktop.
Save eihabi/fe15483bc5467ea2cc016924cfd4ba75 to your computer and use it in GitHub Desktop.
Increase Post Meta Limit
<?php
add_filter( 'gppa_object_type_col_rows_query', function( $sql, $col, $table, $gppa_obj ) {
// Change this to the maximum number of POST meta results
$meta_limit = 1500;
global $wpdb;
if ( $wpdb->postmeta === $table ) {
$sql = str_replace( '1000', $meta_limit, $sql );
}
return $sql;
}, 10, 4 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment