I'm trying to get the WordPress core comment popup function to work, but no luck so far..

I've been following this guide: https://firstsiteguide.com/open-wordpress-comments-popup/

But since I'm using elementor pro in WordPress, there are some issues with changing the correct PHP files, but I have inserted the php code at the corresponding places.

This is the first code:

<?PHP
comments_popup_script(500, 600);
?>

This is the "call the popup script" function:

<?PHP
comments_popup_link( 'No comments', '1 comment', '% comments', 'btn btn-primary', 'Comments Disabled');
?>

This will display: 5 comments And if I press the text it only adds #comment after the url, but no popup..

Now, as I wrote before, i can't guarantee that the first script is called, and I'm a newbie at this..

Does anybody know anything about this?

  • 3
    Not every guide on the internet has to be followed, and really in case of problem with the guide you should ask the author. Frankly I am amazed that anyone still knows that this kind of functionality exists, and in the (too many) years I was using WordPress I have never seen anyone using it, so you might have a rough ride if you are going to try to use it in any productive way. – Mark Kaplun May 26 at 10:05
  • Since I'm using fixed background picture with no repeat, I need the pop-up or else it would look ugly when the users scroll down below the background picture.. – Jerry May 26 at 10:26
  • 2
    What I am trying to suggest (done badly since I was truly surprised anyone knows about it, and shocked that anyone in 2017 still suggest to change core files) that some modern JS to open the comment section in a popup will look much better than trying to adjust old functionality no one likely tried to test and maintain for years. – Mark Kaplun May 26 at 14:48
  • @markkaplun ok, well since I'm a newbie I was looking for the easiest way to implant it. I've also searched for a plugin that could solve this, but no luck yet. You don't have any suggestions? – Jerry May 26 at 16:00

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.