Possible to randomize shortcode parameter?
-
This seems like it should be fairly simple but I just can’t seem to make it work and after an embarrassing number of hours searching for an answer and trying different things I have finally decided to post my issue to the experts.
I have a shortcode which works as such:
[shortcode id = '123']
and it works just fine like that.
But what I would like, is to have the “id” parameter be a random number between “x” and “y”. For example, where “x” might be 120, “y” might be 130, and “id” would end up as ‘123’, ‘128’, ‘122’ or etc.Is this possible? And if it is, why is it not used more often? It seems like it would be quite useful in order to customize pages for each user.
Thank you for helping out in advance.
- The topic ‘Possible to randomize shortcode parameter?’ is closed to new replies.