Use this free WordPress plugin to insert a Canadian Bilingual Nutrition Facts Label to pages or posts with a shortcode.
|Author:||Dandelion Web Design Inc. (profile at wordpress.org)|
|WordPress version required:||3.0|
|WordPress version tested:||4.2.2|
|Added to WordPress repository:||25-01-2014|
Warning! This plugin has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.
|Total downloads:||2 049|
Click to start download
This plugin creates a 'Label' custom post type which can be assigned to any page or post.
- Includes Vitamins A, C, Calcium and Iron
- "Not a Significant source of _____" line will be generated for blank fields
- Add user generated additional vitamins
- Use the shortcode [nutrition-label id=XXX] to display a nutrition label.
- When creating the label you can also specify the page/post and use shortcode [nutrition-label] to display the nutrition label that has been attached to the page/post.
- Developers can add do_shortcode('[nutrition-label]') to their templates.
I appreciate all donations, no matter the size. Further development of this plugin is not contingent on donations, but they are a nice incentive. To donate click on the "donate to this plugin" link in the sidebar below Author.
Install and activate the plugin. Then navigate to the new "Labels" custom post type in the admin.
Add/Edit Label Form - select a page/post to attach the label. Then simply fill in all the fields
Include 'do_shortcode' in your template. It will search for the first label attached to that page.
Add a label with the shortcode and label id [nutrition-label id=XXX].
Example generated label
Generated label with Vit C left blank showing as "Not a significant source of vitamin C" and with Thiamine added
Example how to add additional vitamins
What’s the shortcode for this plugin?
[nutrition-label] or [nutrition-label id=XXX] Change id=XXX to the specific id number for your label.
What units does the label use?
- Grams (g): totalfat, satfat, transfat, carbohydrates, fiber, sugars, protein
- Milligrams (mg): cholesterol and sodium
- Percentages: for Vitamins A, C, Calcium and Iron
How do I add additional vitamins?
See screenshot #7 – you click Add New Vitamin then edit the field label to give the vitamin a name
How do I get the line “Not a significant source of ____” to work?
Leave a vitamin blank and it will be added to the line. If you put a 0 in the field, it will not be added. You can also add new vitamins, label them in the order you want them to appear, and leave the field blank. Such as “Not a significant source of vitamin C, or thiamine.”
- Add ability for user generated additional vitamins
- If a field is left blank add it to text summary line “Not a significant source of”
- Separated CSS from the main plugin file. Also directories are added for css, js and images.
- change label background colour from transparent to white
- update to readme.txt
- Create a second field for French version of Serving Size
- wider field widths in admin
- set the daily values – Canada Iron DV is 14mg/US is 18mg and Canada Calcium DV is 1100mg/US is 1000mg
- Initial release