Skip to content

Instantly share code, notes, and snippets.

@carlodaniele
Last active February 7, 2016 15:43
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 carlodaniele/95d513e41ad523ea1761 to your computer and use it in GitHub Desktop.
Save carlodaniele/95d513e41ad523ea1761 to your computer and use it in GitHub Desktop.
<?php
// retrieve the _food_cholesterol current value
$current_cholesterol = get_post_meta( $post->ID, '_food_cholesterol', true );
// retrieve the _food_carbohydrates current value
$current_carbohydrates = get_post_meta( $post->ID, '_food_carbohydrates', true );
// stores _food_vitamins array
$current_vitamins = ( get_post_meta( $post->ID, '_food_vitamins', true ) ) ? get_post_meta( $post->ID, '_food_vitamins', true ) : array();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment