Hello,
Thank you for contacting Rank Math support and bringing your concern to our attention.
Since our Spintax feature is implemented via variables, you need to ensure that you have pre-process the variable you will include in the template file.
Please refer to this sample code:
$random = RankMath\Helper::replace_vars("%randomword(Tesla|BMW|Ferrari)%");
Hope that helps and please do not hesitate to let us know if you need our assistance with anything else.
Hello Sir,
$random = RankMath\Helper::replace_vars(“%randomword(Tesla|BMW|Ferrari)%”);
It’s working fine.. Now, Can I add hyperlink or bold text like Tesla ?
Can I add any HTML tag ?
Hello,
This variable was made to generate texts/word only and no other formatting. Adding HTML tags will be stripped before we output the chosen random word.
You may wrap the HTML tag in the outputted word, not inside the %randomword(...)% variable.
Looking forward to helping you.
Thank you.