• Resolved yudhistraverma

    (@yudhistraverma)


    Hello,

    I just read the other post regarding the same issue but there was no final solution, hence started the new thread.

    Could you please tell me how to not show, “No Comments” from posts which don’t have any comments? I don’t want to disable the comments count globally.

    Regards,
    Yudi

Viewing 6 replies - 1 through 6 (of 6 total)
  • This thread was started 3 weeks ago. Did you get it resolved? I would also know if there is some way you can do this.

    Hi,

    In the content.php file of your theme, replace the following line of code:

    <a href="<?php comments_link(); ?>" class="post-comments">
    	<i class="fa fa-comment" aria-hidden="true"></i>
    	<?php comments_number( esc_html__('No comments','llorix-one-lite'), esc_html__('One comment','llorix-one-lite'), esc_html__('% comments','llorix-one-lite') ); ?>
    </a>

    with the following:

    <?php $comment_count = get_comment_count($post->ID); ?>
    <?php if ($comment_count['approved'] > 0) : ?>
    	<a href="<?php comments_link(); ?>" class="post-comments">
    		<i class="fa fa-comment" aria-hidden="true"></i>
    		<?php comments_number( esc_html__('No comments','llorix-one-lite'), esc_html__('One comment','llorix-one-lite'), esc_html__('% comments','llorix-one-lite') ); ?>
    	</a>
    <?php endif; ?>

    And it should do the work. And make sure to use a child theme for this task: https://docs.themeisle.com/article/14-how-to-create-a-child-theme

    Let me know if it works. ??

    I am using Flythemes Corporate Pro. I cannot find out how to remove from our post the words ‘By Admin’ and ‘0 Comments’.

    I will be posting things as news items and we are not inviting comments. How do we remove this words please?

    Having looked at the code within the content.php it is different that the one mentioned by @hardeepasrani

    I have tried to contact support at Flythemes 5 times, but no response.

    Hi,

    It appears that you’re using a commercial product. www.ads-software.com forum is only for the GPL products. Forum volunteers are also not given access to commercial products, so they would not know why your commercial theme or plugin is not working properly. This is one other reason why volunteers forward you to the commercial product’s vendors. The vendors are responsible for supporting their commercial product.

    Also, you have posted your question in the wrong forum. You should post them here: https://flythemes.net/forums/forum/themes-forum/

    The team was off for a bit, but it appears they are back now, as you can read in those threads.

    Thank you.

    Thread Starter yudhistraverma

    (@yudhistraverma)

    Hello Hardeep,

    Thank you for the help.
    It works great.
    Have a good day ahead.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Remove "No Comments" From Posts having no comments’ is closed to new replies.