Tagged: comment section, search index
- This topic has 7 replies, 3 voices, and was last updated 3 years, 10 months ago by Theme Horse Support Team.
-
AuthorPosts
-
June 19, 2020 at 10:13 pm #78650June 21, 2020 at 2:23 am #78673johnParticipant
hello i’m still waiting for your feedback
June 21, 2020 at 3:45 am #78679Theme Horse Support TeamKeymasterWe have checked and its working well, could you please share you the exact search result page where the ‘No Comment’ is showing.
Thanks
June 21, 2020 at 3:53 am #78682June 22, 2020 at 12:27 am #78724johnParticipantI’m still waiting
June 22, 2020 at 8:41 am #78736Theme Horse Support TeamKeymasterHi John,
We will update this into next version update till then follow the instruction below which disable the no-comment links if there is 0 comment:
Just go to theme directory > template-parts > content.php on line no: 64 and in content-search.php on line no: 45 you will find below line of code:
<?php if ( comments_open() ) { ?>
just replace above mentioned code to the below one.
<?php if ( comments_open() && get_comments_number() ) { ?>
Thank you!
June 22, 2020 at 11:59 am #78742johnParticipantEven if there are comments, I do not want the comment numbers to display in search results either.
June 23, 2020 at 7:10 am #78771Theme Horse Support TeamKeymasterThen remove the below mentioned code that you will find on content.php page line 64 to 68 and content-search.php page line 45 to 49.
<?php if ( comments_open() ) { ?> <div class="comments"> <?php comments_popup_link( __('No Comments', 'newscard'), __('1 Comment', 'newscard'), __('% Comments', 'newscard'), '', __('Comments Off', 'newscard') ); ?> </div><!-- .comments --> <?php } ?>
Note: we recommend you to customize the code after making a child theme so that you won’t loose any customized code when you update the new to a new version in future.
Thanks
-
AuthorPosts
- You must be logged in to reply to this topic.