Wordpress beginner here with a probably easy problem, yet I don't know how to do it. I want to disable caching on certain pages of my site.
I best describe what I do:
- I have written a plugin in php
- the php files (among other things) create a html that I insert via shortcode into a WP page
- on my site, the users can create such leaflet maps (on one page) and show them to the world (on another page)
- Now when the user changes something on the authoring page, it is (most of the time) not shown on the audience page unless the user clears the cache.
I tried adding a random key to the .js file like this
<script src="test.js?random=<?php echo uniqid(); ?>"></script> but it does not work.
I think I need to use some these hooks I keep hearing about, but I have no clue how.