Wordpress popular article plug-in WP-PostViews usage

Source: Internet
Author: User
I believe many wordpress blogs have installed the WP-PostViews popular article (log) plug-in? The WP-PostViews plug-in is used to measure the number of times an article has been read. with WP-PostViewsWidget, you can display the most frequently read articles or pages on the sidebar, and the articles with the most read Times under a certain category. Popular article plug-ins can display the most popular and popular articles on your blog

I believe many wordpress blogs have installed the WP-PostViews popular article (log) plug-in? The WP-PostViews plug-in is used to measure the number of times an article has been read. with the WP-PostViews Widget, you can display the most frequently read articles or pages on the sidebar, and the articles with the most read Times under a certain category. Popular article plug-ins can display the most popular and popular articles on your blog, which can increase the viscosity of your blog to a certain extent.

However, the wordpress-PostViews popular article plug-ins do not have detailed installation instructions and the interface language is English, so I believe many people, like me, may be directly in the wordpress gadgets (widgets) attach? Of course, it is convenient to mount a wordpress widget. However, if your blog topic does not support a wordpress widget, you may not be able to mount it. In fact, the WP-PostViews popular article plug-ins can also be mounted through code.

If the theme you are using does not support gadgets, don't worry. You just need to add the following code to a proper position in sidebar. php:

Displays the most frequently read articles or pages:

  
  
 

If you only want to display the articles that read the most frequently, use the following sentence:

  
  
 

If you only want to display 10 articles that read the most frequently, use the following code:

  
 
 

Note: The first parameter of the get_most_viewed function determines the type to be displayed. optional options include post, page, and both. The second parameter determines the number of entries to be displayed.
If you want to display the most frequently read articles in a category, use the following section:

  
  
 

Note: The get_most_viewed_category function has three parameters: the first value is the category ID, and the second value is the category. the optional values are both, page, and post. The third value determines the number of entries to be displayed.

WP-PostViews hot article plug-in

Download the WP-PostViews popular article plug-in

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.