The following shortcode is available in the Pro Plus version only.

[wlt-macronutrients] displays a specific macronutrient figure from the macronutrient intake calculations. For more information on macronutrient calculations please visit our calculations page.

The best way to explain how this shortcode works is to look at the output of [wlt-macronutrient -table]. This table displays the macronutrient intake calculations for a user and how it is split over type (meal type / total),  progress (whether to maintain / lose weight) and nutrient (fats, carbs or proteins):

Taking the table above, you may only be interested in displaying the recommended proteins to consume at lunch if wanting to lose weight. This is where the [wlt-macronutrients] comes into play. Given that example, you would use this shortcode:

[wlt-macronutrients type=”lose” type=”lunch” nutrient=”protein”]

For further examples, please look at this Gist.

Shortcode Arguments

The shortcode supports the following arguments:

Argument Description Options Example
error-message When rendering the shortcode, if an error occurs due to missing criteria (for example Date of Birth) a generic message is displayed. This can be replaced by specifying this argument. String [wlt-macronutrients error-message="Please complete all the fields on the preference page"]
progress Specifies whether to display the calories for "maintain" or "lose" weight. 'maintain' (default) or 'lose' [wlt-macronutrients progress="maintain" type="total"]
type Specifies which type of meal or total to display the calorie figures for. 'breakfast', 'lunch', 'dinner', 'snack' or 'total' (default). [wlt-macronutrients progress="maintain" type="total"]
nutrient Specifies which type of nutrient should be displayed i.e. fats, proteins or carbohydrates. 'fats' (default), 'protein' or 'carbs'. [wlt-macronutrients progress="maintain" type="total" nutrient="fats"]
user-id By default, the shortcode will display the calorie figuer for the current user. If you wish to display data for a given user, use the following argument. A number. [wlt-macronutrients user-id="1"]
Yes No Suggest edit
Help Guide Powered by Documentor
Suggest Edit