Skip to content

Instantly share code, notes, and snippets.

@eihabi

eihabi/meta_limit.php Secret

Created Jul 17, 2020
Embed
What would you like to do?
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
You can’t perform that action at this time.