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:
Well done you have lost weight (since last weight)
[weight-loss-tracker-message type=lost consecutive=3]
Well done you have lost weight 3 times
Unlucky, you have gained weight since your last entry.
[weight-loss-tracker-message type=gain consecutive=3]
Oh no… you have gained weight 3 times…
The shortcode supports the following arguments:
|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||[wlt-message type='lost']Message here[/wlt-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.||[wlt-message consecutive=3]Message here[/wlt-message]|