-
-
Save eihabi/fe15483bc5467ea2cc016924cfd4ba75 to your computer and use it in GitHub Desktop.
Increase Post Meta Limit
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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
👉 This Gist has been migrated to the Gravity Wiz Snippet Library:
https://github.com/gravitywiz/snippet-library/blob/master/gp-populate-anything/gppa-postmeta-property-value-limit.php