Skip to content

Instantly share code, notes, and snippets.

@SiR-DanieL
Created December 8, 2016 06:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SiR-DanieL/9d015eaea7fd45c8549692e735a362f4 to your computer and use it in GitHub Desktop.
Save SiR-DanieL/9d015eaea7fd45c8549692e735a362f4 to your computer and use it in GitHub Desktop.
<?php
// Get the value of the post meta with name `_my_post_meta_name`
$post_meta_value = get_post_meta( $post->ID, '_my_post_meta_name', true );
// Print the post meta value
printf( 'The value of my post meta is %s', $post_meta_value );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment