I want to add a string after an url inside data-href using jQuery. I want to make sure that my Facebook comments plugin creates a separate thread for each page that loads the comments plugin.
What should be added after the data-href url is ?st=<?php echo $post->post_name;?> - but not sure how to implement this in PHP from WordPress into a jQuery code.
right now:
<div class="fb-comments" data-href="https://myurl.com" data-width="100%" data-numposts="3" data-colorscheme="light"></div>
what it should look like with post_slug being the slug that WordPress creates for each individual post.
<div class="fb-comments" data-href="https://myurl.com/?st=post_slug" data-width="100%" data-numposts="3" data-colorscheme="light"></div>