Last active
December 15, 2017 12:21
-
-
Save barrykooij/94e380e81fc02cfd04a9 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 custom_rp4wp_add_meta_fields( $meta_fields, $post_id, $post ) { | |
// replace my_post_type with your post type | |
if ( 'my_post_type' === $post->post_type ) { | |
// replace my_post_meta_field with your meta key. You can add as many as you like | |
$meta_fields[] = 'my_post_meta_field'; | |
} | |
return $meta_fields; | |
} | |
add_filter( 'rp4wp_related_meta_fields', 'custom_rp4wp_add_meta_fields', 10, 3 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment