The following shortcode is only available in the Pro version of the plugin.

The message shortcode can be used to display custom content when a user gains or loses weight over a number of consecutive weight entries. This will allow you to motivate people when they gain weight a number of times or congratulate if they lose weight.

Below are some examples of its use:

[wt-message type=lost]

Well done you have lost weight (since last weight)


[wt-message type=lost consecutive=3]

Well done you have lost weight 3 times


[wt-message type=gain]

Unlucky, you have gained weight since your last entry.


[wt-message type=gain consecutive=3]

Oh no… you have gained weight 3 times…


The shortcode supports the following arguments:

Argument Description Options Example
type The type determines whether to check for weight gain or weight loss. 'gained' (default)- Gained weight since previous chronlogical entry. 'lost' - Lost weight since previous chronlogical entry [wt-message type='lost']Message here[/wt-message]
consecutive The number of previous consecutive weight entries to consider. For example, if set to 3, then the previous 3 weight entries must have consistently gained or lost weight. Number between 1 and 30. Default 1. [wt-message consecutive=3]Message here[/wt-message]
Yes No Suggest edit
Help Guide Powered by Documentor
Suggest Edit