Recent searches


No recent searches

Most Popular Articles on Home Page

Answered


Posted Nov 02, 2018

I'm looking to add a section to my home page underneath the category buttons that displays most popular articles. 

I assumed that this functionality was available in Zendesk, but I'm not seeing an easy way to do it!

I'm okay with selecting the articles manually if I need to, but has anyone successfully done this with some custom code? I pretty much just want a section that says Most Frequently Asked Questions, and a list of 5-10 articles right on the home page. 


1

13

13 comments

image avatar

Vlad

The Wise One - 2022Community Moderator

Hey Emma, here you go:

 {{#if promoted_articles}}
<section class="articles">
<h3>{{t 'promoted_articles'}}</h3>
<ul class="article-list promoted-articles">
{{#each promoted_articles}}
<li class="promoted-articles-item">
<a href="{{url}}">
{{title}}
</a>
{{#if internal}}
<span class="icon-lock" title="{{t 'internal'}}"></span>
{{/if}}
</li>
{{/each}}
</ul>
</section>
{{/if}}

Just paste this code on the bottom of your HomePage template. After that, yes, you need to manually choose Promoted articles. Just edit an article and on the right side, you will see an option for that purpose. 

Hope this helps!

 

0


Hi Vladan! That does help, thanks!

However, when I pasted in your code, the 'Promoted articles' section showed up twice. Once directly under the categories, and once in the bottom-left corner of the page. 

Screenshot here: 

and my help center url is help.loseit.com if that helps (though I've removed the code for now). 

0


Okay, I might be totally misunderstanding. Do promoted articles automatically show on the help center home page? Because I removed the code, and one of them is still there! 

0


image avatar

Vlad

The Wise One - 2022Community Moderator

Hey Emma, so the key is that promoted articles code was there already.

If you have not marked any articles as promoted, nothing will show up there.

Does it help?

So you don't need my code there and you just need to flag one or more articles as promoted.

Let me know if this doesn't help! 

 

0


Hi Vladan,

Yes that's correct I guess! I didn't realize they were set to automatically show up in the Copenhagen theme. Sorry about that!

On a related note, do you know if there is a way to change the name of the section from promoted articles to something else, using the existing code? I tried changing this code to something else, and it just made the title disappear. :( 

 <h3>{{t 'promoted_articles'}}</h3>

0


image avatar

Vlad

The Wise One - 2022Community Moderator

You are on the right way, here is how the new title should look:

 <h3>My new title here</h3>
 

0


Perfect! Thank you!! Your tips have been saving my life recently! 

0


image avatar

Vlad

The Wise One - 2022Community Moderator

You are welcome! I'm happy if I can help you again! 

0


Hi @...

Do you know if it is possible to automatically create the list of Popular articles based on the most viewed articles?

1


image avatar

Brett Bowser

Zendesk Community Manager

Hey Victoria,

I did some digging and it doesn't look like there's a popular articles helper available to pull this information. The closest helpers we have are recent_articles and recent_activities.

It may be possible to display the most viewed articles but this would require some custom JS on your end to pull this information. Perhaps other users can jump in here and offer up some alternative solutions for you.

I hope this points you in the right direction!

0


Hi,

I'm looking to add a list of the most popular articles onto my help centre homepage. We don't currently use any voting functionality on articles. Is it possible to add a list of the most viewed articles?

Thanks.

0


image avatar

Dainne Kiara Lucena-Laxamana

Zendesk Customer Care

Hi Zoe Darrah,

 

You could create a category or section specifically for your most viewed articles (Organizing knowledge base content in categories and sections) or if you are on the Enterprise plan, you can create a custom landing page that would display your most viewed articles (Creating custom pages in the help center). Hope this helps!

0


Dainne Kiara Lucena-Laxamana Are you saying that we should create a new category and copy paste the most viewed articles there?

0


Please sign in to leave a comment.

Didn't find what you're looking for?

New post