Print

Popular Articles Shortcode

The shortcode displays a list of the most popular articles based on article views.

To enable the article view counter feature, please refer to the article here. 

WordPress Shortcode
// Shortcode used inside the WordPress Editor
%crel_bracket_open%widg-popular-articles kb_id=1 title='Popular Articles'%crel_bracket_close%

Parameters:

  • kb_id: (optional) ID of the knowledge base if Multiple KB add-on installed
  • Title: title above the Popular Articles.
  • Number of Articles: how many articles to display.

You can use the following CSS to make adjustments to the shortcode. Code comments explain what each part does.

CSS
/* Change the title font size and color */
 .widg-shortcode-article-container h4 {
       font-size:18px !important;
       color: #000;
}

/* Change the article font size */
 .widg-shortcode-article-container li {
       font-size:16px;
}
/* Change the article color */
.widg-shortcode-article-container li a {
       color:#000;
}

/* Change article spacing from the left */
.widg-shortcode-article-container ul {
  padding-left:5px;
}


Was this article helpful?
0 out Of 5 Stars
5 Stars 0%
4 Stars 0%
3 Stars 0%
2 Stars 0%
1 Stars 0%
How can we improve this article?
Please submit the reason for your vote so that we can improve the article.
Need help?
Table of Contents