How to create a shortcode using WP-PostViews plugin? (2 posts)

  1. thinkweird
    Posted 6 years ago #

    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')): ?>
          <?php get_most_viewed(); ?>
    <?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.

  2. thinkweird
    Posted 6 years ago #

    Allow me to clarify:

    Except for creating a short code, is there any other means to run PHP script directly from the post content?

Topic Closed

This topic has been closed to new replies.

About this Topic