Skip to content

Instantly share code, notes, and snippets.

@barrykooij
Created December 19, 2014 10:32
Show Gist options
  • Save barrykooij/1a3b78fbe6be85f716de to your computer and use it in GitHub Desktop.
Save barrykooij/1a3b78fbe6be85f716de to your computer and use it in GitHub Desktop.
function bk_rp4wp_change_weight( $weight, $post, $meta_field ) {
if ( 'my_post_type' === $post->post_type && 'my_post_meta_field' === $meta_field ) {
$weight = 100;
}
return $weight;
}
add_filter( 'rp4wp_related_meta_fields_weight', 'bk_rp4wp_change_weight', 10, 3 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment