Skip to content

Instantly share code, notes, and snippets.

@FernE97
Created March 9, 2012 19:00
Show Gist options
  • Save FernE97/2008075 to your computer and use it in GitHub Desktop.
Save FernE97/2008075 to your computer and use it in GitHub Desktop.
PHP: WordPress Custom Field
<?php
// Custom fields
if ( get_post_meta( $post->ID, 'custom_01', true ) ) {
echo get_post_meta( $post->ID, 'custom_01', true );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment