Title: Nutrition Facts Label
Author: kengimel
Published: <strong>27.11.2015</strong>
Last modified: 17.12.2015

---

Hae lisäosia

![](https://ps.w.org/nutrition-facts-label/assets/banner-772x250.png?rev=1296310)

This plugin **hasn’t been tested with the latest 3 major releases of WordPress**.
It may no longer be maintained or supported and may have compatibility issues when
used with more recent versions of WordPress.

![](https://ps.w.org/nutrition-facts-label/assets/icon-128x128.png?rev=1296312)

# Nutrition Facts Label

 [kengimel](https://profiles.wordpress.org/kengimel/)

[Lataa](https://downloads.wordpress.org/plugin/nutrition-facts-label.zip)

 * [Tiedot](https://fi.wordpress.org/plugins/nutrition-facts-label/#description)
 * [Arvostelut](https://fi.wordpress.org/plugins/nutrition-facts-label/#reviews)
 *  [Asennus](https://fi.wordpress.org/plugins/nutrition-facts-label/#installation)
 * [Kehitys](https://fi.wordpress.org/plugins/nutrition-facts-label/#developers)

 [Tuki](https://wordpress.org/support/plugin/nutrition-facts-label/)

## Kuvaus

Our motivation for releasing this plugin is based on a forum discussion on the food-
cook theme support site.

We felt that we already had some code that could serve as a basis for producing 
this plugin, other food bloggers could benefit and possibly improve on.

This plugin will work best on blogs that use [food-cook](http://themeforest.net/item/food-cook-multipurpose-food-recipe-wp-theme/4915630)
theme.

For food blogs that are not based on the food-cook theme, It is possible to create
a [custom post type](https://wordpress.org/plugins/custom-post-type-ui/) called ”
recipe” and an ingredients post_meta entry with key ”RECIPE_META_ingredients”.

We strongly recommended taking this route or using this plugin under the guidance
of a WordPress developer.

From a more technical side, In order to generate a nutrition facts label, you can
either generate an image or generate a post_meta key (gfb_recipe_meta_nutrition_facts)
that holds JSON data (for each recipe) which is used to generate a nutrition label.

This plugin also includes a meta box within the recipe post edit page in the admin
area, which automatically reads the post_meta entry with key ”RECIPE_META_ingredients”
which mainly contains your ingredients list and uses that to generate the nutrition
label.

In order to automatically display a nutrition label on the every recipe, your WordPress
developer should add this line of code to the best possible place.

    ```
      <?php echo do_shortcode( '[embed_nutrition_label]' ) ?>
    ```

It is also possible to embed this as a short-code from the text editor.

But based on the food-cook recipe page layout your options may appear limited, hence
why it is best that a WordPress developer helps out here.

    ```
      [embed_nutrition_label]
    ```

#### How to Video

This plugin provides food bloggers with the ability to add a nutrition facts label
to their recipe post(s).

This plugin provides image download option or short-codes as possible ways of sharing
nutritive insights. It also provides an update facility that adds a nutrition facts
label to already existing recipe posts.

Big thanks to the guys at nutritionix for sharing their [javascript nutrition label](https://github.com/nutritionix/nutrition-label)
which we have tweaked and used here.

We at [www.globalfoodbook.com](http://www.globalfoodbook.com) are open source and
agile proponents. We have open sourced this plugin on [github](https://github.com/globalfoodbook/nutrition-facts-label)
and will continue to improve this.

We appreciate the help we have received from using other plugins and would like 
to contribute back to this awesome WordPress community at every chance possible.

At the moment we are working on improving our algorithms on the backend and would
like it if you could join us.

We would love to hear from you on ways this can be improved, give us a shout via
the our website or via email (we [at] globalfoodbook.com).

Thanks

#### How to Use this Nutrition Label?

Login into your WordPress account.
 Scroll down to the ”Ingredients Section” and
list the Ingredients. Press ”Generate Label” on the Nutrition Facts Label Generator.
The nutrition facts are automatically generated for you. N:B List the ingredients
individually including the quantities.

#### How to Include Nutrition Label on Existing Recipes?

To include nutrition label on existing food recipes, simply press the ”Go” button
for automatic generation of the nutrition label.
 For any unsuccessful updates, 
make sure that the ingredients are placed line by line and in each line they are
without commas or fullstops. Then press the ”Go” button to generate label.

### Notes to developers

#### Contributing

If you would like to contribute to our suite of plugins, head on over to [Global Food Book Labs](https://github.com/globalfoodbook).
Feel free to fork and contribute back.

 1. Fork it (https://github.com/globalfoodbook/nutrition-facts-label)
 2. Create your feature branch (`git checkout -b my-new-feature`)
 3. Commit your changes (`git commit -am 'Add some feature'`)
 4. Push to the branch (`git push origin my-new-feature`)
 5. Create a new Pull Request

#### Adding Screenshots to the WordPress repo

 1. Rename each screenshot for each step like this. For step 1 the screenshot is screenshot-
    1.png.
 2. The banner image is named as banner-772×250.png.
 3. Use an SVN client like smart svn or rapid svn etc to upload these images to the/
    assets folder.
 4. After this, commit and all will be picked up.

#### Pushing plugin to WordPress svn repo

 1.  Clone this repo
 2.      ```
               git clone git@github.com:globalfoodbook/nutrition-facts-label.git
         ```
     
 3.  cd path/to/nutrition-facts-label
 4.  vim .git/config
 5.  Add the code below:
 6.      ```
           [svn-remote "svn"]
                   url = https://plugins.svn.wordpress.org/[plugin_name]/trunk
                   fetch = :refs/remotes/git-svn
         ```
     
 7.  Then merge the master into the new branch:
 8.      ```
               git svn fetch svn
               git checkout -b svn git-svn
               git merge master
               git svn dcommit --username [Wordpress.org username]
         ```
     
 9.  Then rebase that branch to the master, and you can dcommit from the master to 
     svn
 10.     ```
               git checkout master
               git rebase svn
               git branch -d svn
               git svn dcommit --username [Wordpress.org username]
         ```
     

## Kuvankaappaukset

[⌊Generate Nutrition Facts Label⌉⌊Generate Nutrition Facts Label⌉[

Generate Nutrition Facts Label

[⌊Update existing recipes.⌉⌊Update existing recipes.⌉[

Update existing recipes.

[⌊Sample on the recipe page.⌉⌊Sample on the recipe page.⌉[

Sample on the recipe page.

## Asennus

 1. Upload /nutrition-facts-label to the /wp-content/plugins directory
 2. Activate the plugin through the Plugins menu in WordPress

## UKK

  How do I use this Nutrition Label ?

Login into your WordPress account.
 Scroll down to the ”Ingredients Section” and
list the Ingredients. Press ”Generate Label” on the Nutrition Facts Label Generator.
The nutrition facts are automatically generated for you. N:B List the ingredients
individually including the quantities.

  How to Include Nutrition Label on Existing Recipes?

To include nutrition label on existing food recipes, simply press the ”Go” button
for automatic generation of the nutrition label.
 For the unsuccessful updates, 
make sure that the ingredients are placed line by line and in each line they are
without commas or fullstops. Then press the ”Go” button.

## Arvostelut

![](https://secure.gravatar.com/avatar/9ba080682138e95899c69aa6fb8b3859056aecade4ac58a8d1fb4bc6f322d6e4?
s=60&d=retro&r=g)

### 󠀁[Great idea — wish it worked](https://wordpress.org/support/topic/great-idea-wish-it-worked-1/)󠁿

 [scherle](https://profiles.wordpress.org/scherle/) 3.9.2016 1 reply

Does not work at all. Simplest possible test: A recipe containing only 1 C sugar
and nothing else. Total fail on grams, calories and ability to make adjustments 
for serving sizes.

![](https://secure.gravatar.com/avatar/998d30fbd25ba33b600f76179d0e04e9247a68224435cfdfa1efdfaf90aff36d?
s=60&d=retro&r=g)

### 󠀁[great plugin](https://wordpress.org/support/topic/great-plugin-8218/)󠁿

 [kengimel](https://profiles.wordpress.org/kengimel/) 3.9.2016

great plugin

 [ Lue kaikki 2 arvostelua. ](https://wordpress.org/support/plugin/nutrition-facts-label/reviews/)

## Avustajat & Kehittäjät

“Nutrition Facts Label” perustuu avoimeen lähdekoodiin. Seuraavat henkilöt ovat 
osallistuneet tämän lisäosan kehittämiseen.

Avustajat

 *   [ kengimel ](https://profiles.wordpress.org/kengimel/)

[Käännä “Nutrition Facts Label” omalle kielellesi.](https://translate.wordpress.org/projects/wp-plugins/nutrition-facts-label)

### Oletko kiinnostunut kehitystyöstä?

[Browse the code](https://plugins.trac.wordpress.org/browser/nutrition-facts-label/),
check out the [SVN repository](https://plugins.svn.wordpress.org/nutrition-facts-label/),
or subscribe to the [development log](https://plugins.trac.wordpress.org/log/nutrition-facts-label/)
by [RSS](https://plugins.trac.wordpress.org/log/nutrition-facts-label/?limit=100&mode=stop_on_copy&format=rss).

## Muutosloki

#### 1.0

 * Initial Release

#### 1.1

 * Fixes and Modifications
 * Ohjeistus

#### 1.2

 * Bump wordpress compatibile versions

#### 1.5

 * Add configrable NUT_API environment variable

## Metatiedot

 *  Version **1.5**
 *  Last updated **11 vuotta sitten**
 *  Active installations **10+**
 *  WordPress version ** 3.0.1 or higher **
 *  Tested up to **4.4.34**
 *  Language
 * [English (US)](https://wordpress.org/plugins/nutrition-facts-label/)
 * Tags
 * [food](https://fi.wordpress.org/plugins/tags/food/)[food-cook](https://fi.wordpress.org/plugins/tags/food-cook/)
   [nutrition](https://fi.wordpress.org/plugins/tags/nutrition/)[nutrition facts](https://fi.wordpress.org/plugins/tags/nutrition-facts/)
   [nutrition label](https://fi.wordpress.org/plugins/tags/nutrition-label/)
 *  [Edistynyt näkymä](https://fi.wordpress.org/plugins/nutrition-facts-label/advanced/)

## Arvosanat

 3 out of 5 stars.

 *  [  1 5-star review     ](https://wordpress.org/support/plugin/nutrition-facts-label/reviews/?filter=5)
 *  [  0 4-star reviews     ](https://wordpress.org/support/plugin/nutrition-facts-label/reviews/?filter=4)
 *  [  0 3-star reviews     ](https://wordpress.org/support/plugin/nutrition-facts-label/reviews/?filter=3)
 *  [  0 2-star reviews     ](https://wordpress.org/support/plugin/nutrition-facts-label/reviews/?filter=2)
 *  [  1 1-star review     ](https://wordpress.org/support/plugin/nutrition-facts-label/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/nutrition-facts-label/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/nutrition-facts-label/reviews/)

## Avustajat

 *   [ kengimel ](https://profiles.wordpress.org/kengimel/)

## Tuki

Onko sinulla jotain sanottavaa? Tarvitsetko apua?

 [Tukifoorumi](https://wordpress.org/support/plugin/nutrition-facts-label/)