How to make sure, that only the selected post is changing?
If you want to add the post id to your javaScript, i would think of 2 methods. Output a variable and then retrieve it using javascript Let’s say you need the post it. You can create a hidden div, and assign the value of your post id to it: <div id=”my-post-id”><?php echo get_the_ID(); ?></div> Now … Read more