I use wp_schedule_single_event()
for scheduled publishing, and the value of post_content
uses [shortcode]
. I'm using rand()
to generate random numbers and want to put them into each post.
The problem is, I want this random number to become permanent/static. So, every time you refresh the article, this number won't change.
You must return the first rand() value stored in your post's post_meta, when you call your shortcode, check if the value exists, if not generate a value, if it exists use the value stored in Value
in your post_meta