How can I remove the Follow button on my Help Center articles?

Return to top
Have more questions? Submit a request

24 Comments

  • Ziv

    Hello.

    We'd like to have the follow button for but a handful of our articles.

    Any suggestions on how this can be accomplished programmatically?

     

    0
  • Trapta Singh
    Community Moderator

    Hi @Zivbs, copy and paste the below code at the bottom of your article template -

    <style>
    .article-subscribe,
    .article-unsubscribe {display: none;}
    </style>

    <script>
    var _articles = [ID, ID];

    if ( _articles.indexOf({{article.id}}) == -1 ) {
    $('.article-subscribe').show();
    $('.article-unsubscribe').show();
    }
    </script>

    Replace ID with the IDs of articles you want to hide follow button.

    Let me know if you face any issue.

    Thanks

    0
  • Ziv

    Thanks @trapta

    Since the goal for this was to be able to update users on article updates I thought of a more elegant solution. Now the follow button is only displayed for articles that are open for comments. Here it goes (article page):

    {{#unless article.comments_disabled}}
    {{subscribe}}
    {{/unless}}

    Also use {{#unless article.comments_disabled}} to wrap around the whole comments section in the same page.

    Cool, huh? 

    0
  • Trapta Singh
    Community Moderator

    @Zivbs , Yeah right.

    0
  • Zachary Browne

    I am on the basic, free version and do not see this option. Do I have to upgrade in order to remove the "Follow" button? 

    0
  • Trapta Singh
    Community Moderator

    Hi @Zachary,

    You don't have to upgrade. You will still have access to edit the code. You can go to the article template, remove the {{subscribe}} component and it will be no longer visible to you.

    Thanks

    0
  • Zachary Browne

    Hi @Trapta, 

    I don't see this option available to me. Under "Preview" I select "Templates: Article Page" and nowhere do I see a place to edit code. Everything I've read says that editing theme is only available on professional plans. Where do I edit the code for the articles template? 

    0
  • Trapta Singh
    Community Moderator

    @Zachary, take a look at these posts -

    Let me know if you still have issues.

    Thanks

    0
  • Jessie Schutz
    Zendesk Team Member

    Hey Zachary!

    Apologies if there's been a mix-up here... you do need to be on the Guide Professional plan in order to customize your templates!

    0
  • Sydney Phelon

    Hello! I am wondering if anyone can help me re-insert the "follow" button into my sections. We input some custom code to make our sections into accordions, but in doing so, we lost the ability to "follow" sections. How can we make these Sections followable?

    0
  • Trapta Singh
    Community Moderator

    Hi @Sydney,

    Try putting the below code in your section_page.hbs template and you will be able to see the follow button on section template.

    {{#if settings.show_follow_section}}
    {{subscribe}}
    {{/if}}

    Let me know if this solves your issue.

    Team Diziana

     

    0
  • Justin

    Change we change the words "Follow" and "Unfollow" ?

    0
  • Trapta Singh
    Community Moderator

    Hey Justin,

    Where do you want to change the text? On section template or on article template?

    Thanks

    0
  • Justin

    For community post pages. We want the button to say “follow this discussion” instead of “follow”. Is this possible to change?

    0
  • Trapta Singh
    Community Moderator

    Put the below code at the bottom of your community_post_page.hbs template and let me know if this works for you.

    <script>
    $('.post-subscribe').text('follow this discussion');
    </script>

    Team Diziana

    0
  • Justin

    That worked perfectly in our sandbox. Thank you so much!

    0
  • Fernando Mendes

    Team
    I need some help here PLEASEEE

    I managed to remove the follow button from the article´s page - although it still shows on the Section page

    Anyone please?

    And many thanks

    0
  • Sushant Awalekar
    Community Moderator

    Fernando Mendes

     

    You can simply remove/hide it from theme settings
    Go to section page elements and uncheck the follow.


    0
  • Fernando Mendes

    Many thanks Sushant Awalenkar

    Although this was the first option I did and as usual with Zendesk - IT NEVER WORKS!

    But many thanks for the reply and regards.

     

    0
  • Sushant Awalekar
    Community Moderator

    Fernando Mendes

    You can try removing {{subscribe}} reference from section_page.hbs

    1.Open your theme
    2.Click on Edit code

    3. open section_page.hbs

    4.Remove {{subscribe}} reference or comment the line.

    Hope this helps!!


    0
  • Fernando Mendes

    Once again Sushant Awalekar and this was what I did in the end and it worked.

    I appreciate your help.

    Rgs

    0
  • John Hartnett

    How do you remove the option of following "New articles and comments" from the follow button? We have comments disabled, so there is no reason for a user to follow comments. I want users to be able to follow specific articles for updates or all new or updated articles within a section/category.

    0
  • Chris Stock
    Community Moderator

    Hi John Hartnett, one way to achieve this would be to add the following to the end of your theme's style.css file:

    [data-valuetext="New articles and comments"] {
    display: none !important;
    }

    This will override the default styling for that element.

     

    0
  • John Hartnett

    Thanks Chris! I'll give that a try.

    0

Please sign in to leave a comment.

Powered by Zendesk