Title: How to create a shortcode using WP-PostViews plugin?
Last modified: August 19, 2016

---

# How to create a shortcode using WP-PostViews plugin?

 *  [thinkweird](https://wordpress.org/support/users/thinkweird/)
 * (@thinkweird)
 * [16 years, 4 months ago](https://wordpress.org/support/topic/how-to-create-a-shortcode-using-wp-postviews-plugin/)
 * I am using the famous WP-PostViews plugin, which already comes with a function
   to call the most-viewed posts.
 *     ```
       <?php if (function_exists('get_most_viewed')): ?>
          <ul>
             <?php get_most_viewed(); ?>
          </ul>
       <?php endif; ?>
       ```
   
 * My question is: how to use the function `get_most_viewed` and create a shortcode
   for it in function.php?
 * I am no programmer and this task is beyond my current range to tackle.

Viewing 1 replies (of 1 total)

 *  Thread Starter [thinkweird](https://wordpress.org/support/users/thinkweird/)
 * (@thinkweird)
 * [16 years, 4 months ago](https://wordpress.org/support/topic/how-to-create-a-shortcode-using-wp-postviews-plugin/#post-1341612)
 * Allow me to clarify:
 * Except for creating a short code, is there any other means to **run PHP script
   directly from the post content**?

Viewing 1 replies (of 1 total)

The topic ‘How to create a shortcode using WP-PostViews plugin?’ is closed to new
replies.

## Tags

 * [shortcode](https://wordpress.org/support/topic-tag/shortcode/)

 * 1 reply
 * 1 participant
 * Last reply from: [thinkweird](https://wordpress.org/support/users/thinkweird/)
 * Last activity: [16 years, 4 months ago](https://wordpress.org/support/topic/how-to-create-a-shortcode-using-wp-postviews-plugin/#post-1341612)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
