Viewing 8 replies - 1 through 8 (of 8 total)
  • First make sure this is in the <head> portion of your template(s):
    https://codex.www.ads-software.com/Template_Tags/comments_popup_script

    <?php comments_popup_script(); ?>

    Next, if you’re using ‘comments_link(), replace it with:
    https://codex.www.ads-software.com/Template_Tags/comments_popup_link

    <?php comments_popup_link(); ?>

    You can set up a separate template for this in your theme, as well (comments-popup.php).

    Finally, if you want the link to appear on the permalink (single post) page, you'll need to do a tiny bit of editing to the WP source (not sure why it isn't the default). In:

    wp-includescomment-functions.php

    Locate the function comments_popup_link() (about line 90). In this, change:

    if (! is_single() && ! is_page()) {

    to:

    if (! is_page()) {`

    The last line should be:

    if (! is_page()) {

    Ignore the ending tick.

    (Oh, to have edit turned back on!)

    Thread Starter clea

    (@clea)

    Thanks Kafkaesqui, but you only solved half of my problem…

    The link now appears on the permalink page, that’s right. But I still see the comment form embedded on that page (take for example https://www.grandecorniche.com/fotolog/?p=78).

    Thread Starter clea

    (@clea)

    Hey, I did it! After adding the ‘is_page’ code that you mention, I commented the line:

    ‘<?php comments_template(); ?>’

    So it now looks like: ‘<?php //comments_template(); //?>’

    And apparently that solves the problem. Now I just see a nice link to the popup comment window.

    Thanks!

    I’ve got the trouble that when I click on comments the pop up does open, but with the index page of my site. I’ve read through this several times, but I can’t figure it out. I’m fairly new to php and all that.

    When I hover over the link you’ll see: https://www.whispering-words.com/?comments_popup=1 , then it goes to the index page when you click on it.

    (to see: https://www.whispering-words.com/indexx.php )

    Hi. I’m using a template that uses this technique. But in the popup comment window it comes up with my default background image and I need a different one. Is there a way to change the style sheet that gets called?

    I’m having a similar problem at https://www.joshandtamra.com/wp/.

    I’ve got the comments_popup_script in my header file, and in both my index.php and single.php I’ve got the comments_popup_link in the “loop” (I’m assuming this is where Kafkesqui was talking about to put it above but it’s sort of vague). And, in my includes/comments-functions.php it only says

    if (! is_page()) {

    not is_single. yet I still can’t get the link to the popup comments to show up on the permalink pages. for example:
    https://www.joshandtamra.com/wp/?p=27

    I’ve searched the forums and this thread appears to address the exact problem, yet it’s not solving my issue for some reason. Thanks in advance for you help.

    btw, if it helps at all I’m using a heavily modified (by me) version of the Ice theme by Geo. and my index.php and single.php files are identical.

    (and also bumping to see if anyone can help)

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Popup comments in permalinks: is it possible?’ is closed to new replies.