WordPress.org

Ready to get started?Download WordPress

Forums

comments_by_type problems (7 posts)

  1. bloggus
    Member
    Posted 4 years ago #

    I'm just playing with a blank theme and if I have

    <?php if ( ! empty($comments_by_type['comment']) ) : ?>

    it gives me no commets to show which it should.

    If I change it to

    <?php if ( empty($comments_by_type['comment']) ) : ?>

    it shows comments. To be honest i'm confused!

  2. chaz7979
    Member
    Posted 4 years ago #

    Any luck? I am having the same issue.

  3. lyeffeth
    Member
    Posted 4 years ago #

    Try adding the this
    <?php $comments_by_type = &separate_comments($comments); ?>
    directly before
    <?php if ( !empty($comments_by_type['comment']) ) : ?>

    This worked for me except I am using
    <?php if ( !empty($comments_by_type['pings']) ) : ?>
    instead of
    <?php if ( !empty($comments_by_type['comment']) ) : ?>

  4. chaz7979
    Member
    Posted 4 years ago #

    That worked for me as well but, I still posted this as I am curious why I would need to declare it.

  5. Marcomail
    Member
    Posted 4 years ago #

    Why in some blogs

    <?php if ( !empty($comments_by_type['comment']) ) : ?>

    it work alone, but in other is necessary add before

    <?php $comments_by_type = &separate_comments($comments); ?

    ??

  6. Hnrrrch
    Member
    Posted 3 years ago #

    Great lyeffeth! it worked for my custom theme :) ...i'm using WP 3.0.1

  7. Wiliam_Syd
    Member
    Posted 3 years ago #

    Excellent.

    This fixed comment issues I was having with arjuna-x 1.5.3

    Thank you again.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.