WordPress.org

Ready to get started?Download WordPress

Forums

display # of comments after link to post (3 posts)

  1. panantukan
    Member
    Posted 3 years ago #

    If I have a page and when I link to a post I want it to say after the post "13 comments" and have the # automatically update, how would I do that?

    For example,
    check out fake post comments 13

    Would be even better if "comments 13" was also clickable.

    Thanks!

  2. alchymyth
    The Sweeper & Moderator
    Posted 3 years ago #

    for instance:

    <h2><a href="<?php the_permalink() ?>"><?php the_title(); echo ' '.$post->comment_count.' comment'; if($post->comment_count!=1) echo 's'; ?></a></h2>

  3. panantukan
    Member
    Posted 3 years ago #

    thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags