Support » Fixing WordPress » comments_by_type problems

  • 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!

Viewing 6 replies - 1 through 6 (of 6 total)
  • Any luck? I am having the same issue.

    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']) ) : ?>

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

    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); ?

    ??

    Great lyeffeth! it worked for my custom theme 🙂 …i’m using WP 3.0.1

    Excellent.

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

    Thank you again.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘comments_by_type problems’ is closed to new replies.