Trending Conversations - Vertical

Highlight the stories that are resonating with your community and feature the stories that are trending on your site, based on the recent number of comments, using the Trending Conversations tool.

❗️

For the trending articles images to appear an og:image meta tag or vf:image tag is required on the corresponding article linking to an appropriate image for the article. We recommend an aspect ratio of 3:2 and for optimal performance sized as 210px by 140px. More details on these meta tags can be found here.

<div class="viafoura">
  <vf-trending-articles
    title="Trending Articles"
    limit="5"
    days-published="7"
    trend-window="1"
    sort="comments"
    view="full"
    vf-container-id="currentPageContainer"
  >  
  </vf-trending-articles>
</div>

Trending Conversations can be configured using parameters outlined below.
Installation parameters:

NameDescriptionAccepted ValuesDefault
vf-container-idThe container id of the current page.

Is used to exclude the current page from results.

This is not required if the vf:container_id meta tag has been set on the page.
The value of meta vf:container_id"
titleThe title you want displayed at the top of the plugin.Trending Articles
limitThe maximum number of articles to show.1 to 1005
days-publishedThe number of days since the article was created. This is also referred to as the article age. Use 'all' to specify all articles regardless of age.1 to 30, all7
trend-windowThis determines the size of the trend window in hours. For example, when set to 1, a list is retrieved with the articles that have received the most comments in the past 1 hour.

trend-window must be less than or equal to the days-published or there will be no articles to return.
1 to 481
sortUsed to determine how articles are sorted in the list. Currently this list can only be sorted by comment count, but more options will be made available in the future.commentscomments
viewWhat style of widget to display.full or condensedfull

📘

Trending Article Logic

The front end will make up to 3 different requests to get trending articles. If the list obtained in the initial API request is less than the limit, we make a second request modifying trend-window to its maximum value (48).

If after this request there are still no results a third request is made modifying the days-published to its maximum value (30).

Full widget example

Condensed widget example