WordPress.org

Support

Support » Plugins and Hacks » How to create a shortcode using WP-PostViews plugin?

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)
  • 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.
Skip to toolbar