shortcode
-
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.
-
Hi @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.
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
Please share your site’s URL and I’ll have a look.
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 7 years, 10 months ago by
cubicovich.
-
This reply was modified 7 years, 10 months ago by
cubicovich.
-
This reply was modified 7 years, 10 months ago by
cubicovich.
This is what I’m seeing right now:

this is your widget, and I want to make a separate page for articles
-
This reply was modified 7 years, 10 months ago by
cubicovich.
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).
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 7 years, 10 months ago by
cubicovich.
Well, you can create a custom shortcode just for this.
Get the comments count of the current post using the get_comments_number() function, the views count via wpp_get_views(), and then output that with your custom shortcode.
I understand, thanks for the patience, so in your plug-in there is no such function
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.
-
This reply was modified 7 years, 10 months ago by
The topic ‘shortcode’ is closed to new replies.
