Skip to content

Instantly share code, notes, and snippets.

@jameskoster
Created February 18, 2014 11:00
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 jameskoster/9068763 to your computer and use it in GitHub Desktop.
Save jameskoster/9068763 to your computer and use it in GitHub Desktop.
Projects - Display a custom meta field on the projects archive
function display_new_projects_fields() {
global $post;
$location = esc_attr( get_post_meta( $post->ID, '_location', true ) );
echo '<p>' . __( 'Location: ', 'projects' ) . $location . '</p>';
}
add_action( 'projects_after_loop_item', 'display_new_projects_fields', 10 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment