Skip to content

Instantly share code, notes, and snippets.

@sureshHARDIYA
Created October 6, 2017 13:51
Show Gist options
  • Save sureshHARDIYA/e4101169274cb01fb328a4f9f3021a48 to your computer and use it in GitHub Desktop.
Save sureshHARDIYA/e4101169274cb01fb328a4f9f3021a48 to your computer and use it in GitHub Desktop.
Retrieving custom fields
<?php
<?php
// Display Custom Field Value
echo get_post_meta( $post->ID, 'my-field-slug', true );
// You can also use
echo get_post_meta( get_the_ID(), 'my-field-slug', true );
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment