WordPress.org

Ready to get started?Download WordPress

Forums

comments_popup_link is_single hack not working (3 posts)

  1. flashbytes
    Member
    Posted 5 years ago #

    Hello folks,
    I've been looking for a way to display the comments popup link with the number of comments on single pages all over and found this here:
    http://wordpress.org/support/topic/162559

    The comments_popup_link function is the last one defined within the comment-template.php. I did exactly as it says in the suggestion:
    find "if ( is_single() || is_page() )" and replace it with "if ( is_single() )", but it still doesn't work.

    Have there been any changes in the comment functions since this post was written that might prevent those links from being displayed on pages? Is it possible, one of my plug-ins is causing trouble?

    It works on the home page:
    http://www.s-oe-s.de/

    but not on a single page:
    http://www.s-oe-s.de/index.php/k-und-b/

  2. flashbytes
    Member
    Posted 5 years ago #

    *push*
    It seems publishing a post in the middle of the night is not a good idea ;)

    edit:
    gosh! That's odd.

    There should be 9 titles with a comment speech balloon showing up:

    <h3>Wir fragen die Stuttgarterinnen und Stuttgarter:</h3>
    <?php $recent = new WP_Query("cat=12&amp;showposts=9"); while($recent->have_posts()) : $recent->the_post();?>
      <b><a>" rel="bookmark" title="Permanenter Link zu '<?php the_title(); ?>'"><?php the_title(); ?></a></b> &nbsp; <span class="comment"><?php comments_popup_link('(0)', '(1)', '(%)', 'test', 'X'); ?></span>
    <?php endwhile; ?>
  3. flashbytes
    Member
    Posted 5 years ago #

    My apologies. There were problems with the hoster's database. Now the site is up and running again. Please check the two links. - I know it's in German, but that's not so important ;)

    I used the same code in both cases and made the mentioned hack, but it doesn't work for a reason I can't explain. There should be a number with a link after the speech balloons.

    Anyone an idea?

Topic Closed

This topic has been closed to new replies.

About this Topic