[resolved] Comment Popups refuse to work (3 posts)

  1. godsinventor
    Posted 8 years ago #

    Alright, I am using the sunsetidea-10 theme and want to have popup comments. But is refusing to work!!! I have used comments_popup_link(); in tandem with comments_popup_script(); with all of the options filled in. Why wont it work? Am I putting them in the wrong place? I am putting them in single.php and page.php Where should I put them if not there? header.php?

  2. Kafkaesqui

    Posted 8 years ago #

    This would normally work off of every template *but* the single post and Page templates, at least in the case of comments_popup_link(). But we can temporarily fool WordPress to make it work:

    In single.php:
    <?php $wp_query->is_single = false; comments_popup_link(); $wp_query->is_single = false; ?>

    In page.php
    <?php $wp_query->is_page = false; comments_popup_link(); $wp_query->is_page = false; ?>

  3. godsinventor
    Posted 8 years ago #

    Thank you so much! This worked wonderfully! I spent over a week on this and the answer was staring me in the face! Thanks again for showing me how to do this!

Topic Closed

This topic has been closed to new replies.

About this Topic