Last active
August 29, 2015 14:11
-
-
Save barrykooij/0ce772d85b16fdaa0e02 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
function wpjm_rp4wp_add_meta_fields( $meta_fields, $post_id, $post ) { | |
if ( 'post' == $post->post_type ) { | |
$meta_fields = array( 'wpjm_company' ); | |
} | |
return $meta_fields; | |
} | |
add_filter( 'rp4wp_related_meta_fields', 'wpjm_rp4wp_add_meta_fields', 10, 3 ); | |
function wpjm_change_weight( $weight, $post, $meta_field ) { | |
if ( 'post' == $post->post_type ) { | |
$weight = 100; | |
} | |
return $weight; | |
} | |
add_filter( 'rp4wp_related_meta_fields_weight', 'wpjm_change_weight', 10, 3 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment