How to Output which matched meta_keys were found from custom_type_posts?

Let me see if I understand your question correctly: You have the meta values of the player this page belongs to. Then in the loop you have the corresponding meta value of each matched player. All you need to do is compare them: if($player_position == get_post_meta($post->ID, ‘player_position’, true)){ // This player is on the same … Read more

Linking Custom Fields to Database Records

Custom field data saved in the wp_postmeta table. Best way to access custom field is using wordpress built-in functions. for example: <?php $mykey_values = get_post_custom_values(‘my_key’); foreach ( $mykey_values as $key => $value ) { echo “$key => $value (‘my_key’)<br />”; } ?> 0 => First value (‘my_key’) 1 => Second value (‘my_key’) 2 => Third … Read more