Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter edgarcia78

    (@edgarcia78)

    So after hours of playing around, I think I figured out the necessary code. So for anyone interested in adding a comment count for each event in the agenda view, just add the following code anywhere in the agenda.php file. You will have to modify the file via FTP. Add the code where ever you want to to show the count. I personally wanted the count on the “Read More” button. Here is the code that I used (only the bolded code):

    <?php _e( ‘Read more ?’, AI1EC_PLUGIN_NAME ) ?>
    <?php
    $comments_count = wp_count_comments($event->post_id);
    echo ” (“.$comments_count->approved .” Comments)” . “
    “;
    ?>

    ?>

    Thread Starter edgarcia78

    (@edgarcia78)

    Here is the code again… I don’t think it came out correct in the previous post.

    <?php
    $comments_count = wp_count_comments($event->post_id);
    echo ” (“.$comments_count->approved .” Comments)” . “
    “;
    ?>

    Yani

    (@yaniiliev)

    Thanks for sharing this Ed!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: All-in-One Event Calendar] How to get a comment count in agenda view’ is closed to new replies.