Title: shortcode
Last modified: May 25, 2018

---

# shortcode

 *  Resolved [cubicovich](https://wordpress.org/support/users/cubicovich/)
 * (@cubicovich)
 * [8 years ago](https://wordpress.org/support/topic/shortcode-583/)
 * I can not figure out how to use shortcode to display the number of comments or
   views, is there such an opportunity? show a couple of examples.

Viewing 13 replies - 1 through 13 (of 13 total)

 *  Plugin Author [Hector Cabrera](https://wordpress.org/support/users/hcabrera/)
 * (@hcabrera)
 * [8 years ago](https://wordpress.org/support/topic/shortcode-583/#post-10324844)
 * Hi [@cubicovich](https://wordpress.org/support/users/cubicovich/),
 * It’s very simple. Here’s an example:
 * `[wpp range="last7days" stats_views=1 stats_comments=1]`
 * For more examples (and documentation) please go to **Settings > WordPress Popular
   Posts > Parameters**.
 *  Thread Starter [cubicovich](https://wordpress.org/support/users/cubicovich/)
 * (@cubicovich)
 * [8 years ago](https://wordpress.org/support/topic/shortcode-583/#post-10324895)
 * yes I did, but I always write “Sorry. No data so far.”
 * I have links to other articles on the page, I want to place under them a number
   of comments and views, as in the Widget
 *  Plugin Author [Hector Cabrera](https://wordpress.org/support/users/hcabrera/)
 * (@hcabrera)
 * [8 years ago](https://wordpress.org/support/topic/shortcode-583/#post-10324919)
 * Please share your site’s URL and I’ll have a look.
 *  Thread Starter [cubicovich](https://wordpress.org/support/users/cubicovich/)
 * (@cubicovich)
 * [8 years ago](https://wordpress.org/support/topic/shortcode-583/#post-10324921)
 * [https://jowm.ru/ewi/](https://jowm.ru/ewi/)
 *  Thread Starter [cubicovich](https://wordpress.org/support/users/cubicovich/)
 * (@cubicovich)
 * [8 years ago](https://wordpress.org/support/topic/shortcode-583/#post-10324932)
 * https jowm ru/ewi/
 * I use other shortcode to output the comment amount, and to display the number
   of views, plug-ins, I want to use only your plug-in instead of all this
    -  This reply was modified 8 years ago by [cubicovich](https://wordpress.org/support/users/cubicovich/).
    -  This reply was modified 8 years ago by [cubicovich](https://wordpress.org/support/users/cubicovich/).
    -  This reply was modified 8 years ago by [cubicovich](https://wordpress.org/support/users/cubicovich/).
 *  Plugin Author [Hector Cabrera](https://wordpress.org/support/users/hcabrera/)
 * (@hcabrera)
 * [8 years ago](https://wordpress.org/support/topic/shortcode-583/#post-10325129)
 * This is what I’m seeing right now:
 * ![WPP as seen on jowm.ru/ewi](https://i0.wp.com/oi66.tinypic.com/2z73bpl.jpg)
 *  Thread Starter [cubicovich](https://wordpress.org/support/users/cubicovich/)
 * (@cubicovich)
 * [8 years ago](https://wordpress.org/support/topic/shortcode-583/#post-10325144)
 * this is your widget, and I want to make a separate page for articles
 *  Thread Starter [cubicovich](https://wordpress.org/support/users/cubicovich/)
 * (@cubicovich)
 * [8 years ago](https://wordpress.org/support/topic/shortcode-583/#post-10325189)
 * [⌊Image and video hosting by TinyPic⌉⌊Image and video hosting by TinyPic⌉[
    -  This reply was modified 8 years ago by [cubicovich](https://wordpress.org/support/users/cubicovich/).
 *  Plugin Author [Hector Cabrera](https://wordpress.org/support/users/hcabrera/)
 * (@hcabrera)
 * [8 years ago](https://wordpress.org/support/topic/shortcode-583/#post-10325216)
 * Ah, in that case you have to figure out how to replace these with WPP’s shortcodes
   using the Elementor Page Builder. I can’t help you there as I’m not familiar 
   with Elementor. You may want to get in touch with your theme developer and ask
   them about this (or hire someone to do this for you if you don’t know how to /
   don’t have the time for it).
 *  Thread Starter [cubicovich](https://wordpress.org/support/users/cubicovich/)
 * (@cubicovich)
 * [8 years ago](https://wordpress.org/support/topic/shortcode-583/#post-10325254)
 * under the button, the text is normal, there’s a shortcode in it, so if your shortcode
   looked like a normal editor
 * how do I display views and comments for a single page?
    -  This reply was modified 8 years ago by [cubicovich](https://wordpress.org/support/users/cubicovich/).
 *  Plugin Author [Hector Cabrera](https://wordpress.org/support/users/hcabrera/)
 * (@hcabrera)
 * [8 years ago](https://wordpress.org/support/topic/shortcode-583/#post-10325338)
 * Well, you can [create a custom shortcode](https://codex.wordpress.org/Shortcode_API)
   just for this.
 * Get the comments count of the current post using the [get_comments_number()](https://developer.wordpress.org/reference/functions/get_comments_number/)
   function, the views count via [wpp_get_views()](https://github.com/cabrerahector/wordpress-popular-posts/wiki/2.-Template-tags#wpp_get_views),
   and then output that with your custom shortcode.
 *  Thread Starter [cubicovich](https://wordpress.org/support/users/cubicovich/)
 * (@cubicovich)
 * [8 years ago](https://wordpress.org/support/topic/shortcode-583/#post-10325900)
 * I understand, thanks for the patience, so in your plug-in there is no such function
 *  Plugin Author [Hector Cabrera](https://wordpress.org/support/users/hcabrera/)
 * (@hcabrera)
 * [8 years ago](https://wordpress.org/support/topic/shortcode-583/#post-10325942)
 * Don’t worry about it. And no, unfortunately there isn’t a shortcode that does
   what you need which is why I suggested creating one. It really isn’t difficult,
   check the link I shared in my previous comment for details.

Viewing 13 replies - 1 through 13 (of 13 total)

The topic ‘shortcode’ is closed to new replies.

 * ![](https://ps.w.org/wordpress-popular-posts/assets/icon-256x256.png?rev=1232659)
 * [WP Popular Posts](https://wordpress.org/plugins/wordpress-popular-posts/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wordpress-popular-posts/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wordpress-popular-posts/)
 * [Active Topics](https://wordpress.org/support/plugin/wordpress-popular-posts/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wordpress-popular-posts/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wordpress-popular-posts/reviews/)

## Tags

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

 * 13 replies
 * 2 participants
 * Last reply from: [Hector Cabrera](https://wordpress.org/support/users/hcabrera/)
 * Last activity: [8 years ago](https://wordpress.org/support/topic/shortcode-583/#post-10325942)
 * Status: resolved