How are promoted articles sorted on the home page of the Help Center?

Return to top
Have more questions? Submit a request

7 Comments

  • Carly

    Ideally I'd like to be able to organize promoted articles the way I can organize articles within a section. Right now, our promoted articles look uneven because we have a mixture of long/short titles and questions. 

    From a design perspective, I'd much rather have the option to customize the order myself without having to completely rework the categories within our knowledge base.

    1
  • Brett Bowser
    Zendesk Community Team

    Hey Carly,

    I recommend taking a look at the following Community Tip posted by Diziana
    Promoted Articles - Changing the order (custom sorting)

    This post will walk you through step by step on how to change the order of your promoted articles.

    Hope this helps!

    1
  • Aishah Hamzah

    Hi there,

    I'd like to be able to hide promoted articles from the home page of my Help Center, but keep them promoted in my categories. Does anyone know how to do this?

    Cheers,

    Aishah

    0
  • Karen Snyder

    Aishah Hamzah

    If you don't want promoted articles to show in the home page of your Help Center, you can edit home_page.hbs to remove the code that displays the promoted articles. Look for a line of code that starts with {{#if promoted_articles}}, and remove the entire block of code including the matching {{/if}}. Be sure to use source control or keep a copy in case you ever want to display the promoted articles on your home page.

    For instance, in the default Copenhagen theme, the following code would have to be removed in order to not display the promoted articles:

    {{#if promoted_articles}}
    <section class="articles">
    <h2>{{t 'promoted_articles'}}</h2>
    <ul class="article-list promoted-articles">
    {{#each promoted_articles}}
    <li class="promoted-articles-item">
    <a href="{{url}}">
    {{title}}
    {{#if internal}}
    <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" focusable="false" viewBox="0 0 16 16" class="icon-lock" title="{{t 'internal'}}">
    <rect width="12" height="9" x="2" y="7" fill="currentColor" rx="1" ry="1"/>
    <path fill="none" stroke="currentColor" d="M4.5 7.5V4a3.5 3.5 0 017 0v3.5"/>
    </svg>
    {{/if}}
    </a>
    </li>
    {{/each}}
    </ul>
    </section>
    {{/if}}
    1
  • Phil Williams
    Community Moderator

    Another method, if you didn't want to delete the code, would be to hide the content in that div on the home page using CSS.

    So on the home_page.hbs template and find the line:

    <section class="articles">

    And replace with:

    <section class="articles" style="display: none;">

    This will hide the content in the div for the home page template.

    0
  • Aishah Hamzah

    Karen Snyder Phil Williams

     

    Thank you both, that worked a treat!

    1
  • Phil Williams
    Community Moderator

    Excellent, that's great to hear! :)

    0

Please sign in to leave a comment.

Powered by Zendesk