Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
  • #2025


    It is possible the number of comments to be removed and instead, use this code?

    <?php if (is_category(‘A’)) { ?>Display A<?php } elseif (is_category(‘B’)) { ?>Display B<?php } ?>

    I’ve found this in the index, I used just do not know how the new code there:

    echo “<span class=’comment_link’>”;

    comments_popup_link(__(‘0′,’expose’), __(‘1′,’expose’), __(‘%’,’expose’));

    echo “</span>”;


    I’m sorry I don’t understand your question? The code you posted is correct. You can replace the comments:

    comments_popup_link(__('0','expose'), __('1','expose'), __('%','expose'));

    with other code like category specific statements.

    The code would look like:

    echo "<span class='comment_link'>";
    if (is_category('A')) { echo 'Display A'; } elseif (is_category('B')) { echo 'Display B'; }
    echo "</span>";



    I used the code.

    echo “<span class=’comment_link’>”;

    if (is_category(‘A’)) { echo ‘Display A'; } elseif (is_category(‘B’)) { echo ‘Display B'; }

    echo “</span>”;

    Unfortunately, now just an empty <span class=”comment_link”></span> tag appears.

    The category A and B are used in the system.


    Did you write


    or did you replace “A” with your ids? Or is the category called “A”?

    Have a look at this site:

    It tells you more about the is_category() function,


    thank you. The error was is_category. it must be in_category.


    Glad that you solved the problem.

Viewing 6 posts - 1 through 6 (of 6 total)

The topic ‘Comments replace with category name’ is closed to new replies.