-
-
Save tommcfarlin/c1245410fdf288edd11c9547711dd76c to your computer and use it in GitHub Desktop.
This file contains 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
<?php | |
// Using post title as the value, but it's just an example. | |
add_user_meta( $user_id, $post_id, $post_title ); |
This file contains 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
<?php | |
// User user email address a value but just an example. | |
add_post_meta( $post_id, $user_id, $email_address ); |
This file contains 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
<?php | |
/** | |
* Using this association will give you the ability to query for information | |
* both on posts and users and then work with the data accordingly. | |
*/ | |
add_user_meta( $user_id, $post_id, $post_title ); | |
add_post_meta( $post_id, $user_id, $email_address ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment