Remove the Follow button on my Help Center articles Follow

Comments

9 comments

  • Avatar
    Zivbs

    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?

     

  • Avatar
    Trapta

    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

  • Avatar
    Zivbs

    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? 

  • Avatar
    Trapta

    @Zivbs , Yeah right.

  • Avatar
    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? 

  • Avatar
    Trapta

    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

  • Avatar
    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? 

  • Avatar
    Trapta

    @Zachary, take a look at these posts -

    Let me know if you still have issues.

    Thanks

  • Avatar
    Jessie - Community Manager

    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!

Please sign in to leave a comment.

Powered by Zendesk