Replacement text
You can place a replacement text reference within your HTML Chunk that is set in an individual shortcode. In some instances you may wish to specify a fall-back word to use in case no parameter exists.
A simple replacement word
Each day when I come to work I usually travel by %vehicle%.
[html_chunks transport vehicle="bus"]
Each day when I come to work I usually travel by bus.
A replacement word with no fall-back
Each day when I come to work I usually travel by %vehicle%.
[html_chunks transport]
Each day when I come to work I usually travel by.
An inoperative fall-back
Each day when I come to work I usually travel by %vehicle/car%.
[html_chunks transport vehicle="train"]
Each day when I come to work I usually travel by train.
An operative fall-back
Each day when I come to work I usually travel by %vehicle/horse-drawn carriage%.
[html_chunks transport]
Each day when I come to work I usually travel by horse-drawn carriage.
Multiple replacements
At the weekend when I %action%, I prefer to %method/travel by car%.
[html_chunks weekend action="have brunch at a café" method="go there by bus"]
At the weekend when I have brunch at a café, I prefer to go there by bus.
[html_chunks weekend replacements="action=go to the shops&method=walk"]
At the weekend when I go to the shops, I prefer to travel by car.
[html_chunks weekend replacements='{"action":"go to the park","method":"ride my bicycle"}']
At the weekend when I go to the park, I prefer to ride my bicycle.
You do not need to escape HTML characters – just use "
rather than "
– within the parameter’s string.