Question
How can I hide article comments using curlybars?
Answer
Instead ofdisabling commentsfor each article using theOpen for Commentsoption, you can hide parts of Help Center articles, like the comments section with a few lines of HTML. In this example, we hide the comments section of the article page. This also hides already existing article comments.
- In Guide, clickGuide adminfollowed by theCustomize designicon () in the sidebar.
- Click the theme you want to edit to open it and then clickEdit Code.
- In the Templates section, select theArticle_page.
- The HTML in the article page might vary depending on your Theme and customizations. Look for the Article comments curlybars on that page.
- Add{{!--before thefor the comments, and--}}after thefor the comments. This adjusts the color of the text to brown, indicating that this section of code is being blocked out.
ClickPublishand thenPreview看你的文章评论disappear.
You can use this trick for hiding anything on the article page, see the articleSelectively hiding Help Center components using Curlybars. The best practice for this is to put the{{!-- --}}before and after the open and close
2 Comments
Is it possible to make comments visible to only a particular segment or user tag?
There is no native functionality in the support interface that allow you to just make a comment visible to a particular segment or user tag. You can use segments to restrict access to entire articles, in your help center, that will include the comments in the article. For more information, you can check this article:Setting view permissions on articles with user segments.
I hope this information help.
Pleasesign into leave a comment.