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

[wt-calories] displays a specific calorie figure from the calorie intake calculations. For more information on calorie calculations please visit our calculations page.

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

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

[wt-calories type=”lose” type=”dinner”]

For further examples, please look at this Gist.

Shortcode Arguments

The shortcode supports the following arguments:

Argument Description Options Example
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. [wt-calories user-id="1"]
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 [wt-calories error-message="Please complete all the fields on the preference page"]
progress Specifies whether to display the calories for "maintain", "gain" "lose" weight. If 'auto' is specified, it will display the relevant type based on the user's selected aim. For example, if they have an aim of losing weight, it will display the value for 'lose'. 'maintain' (default), 'lose', 'gain' or 'auto'l [wt-calories 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). [wt-calories progress="maintain" type="total"]
Yes No Suggest edit
Help Guide Powered by Documentor
Suggest Edit