Shortcode stopped working?
-
Has something changed due to the release of the Elementor widget that would cause the [wpp] shortcode method to stop working? Screenshot attached showing a test of both on a page and only the widget is displaying the post titles.
credentials for the site are: test-site | 13579
Apparently the stupid block editor images aren’t displaying. Here’s the links:
https://postimg.cc/PCTW6mXS
https://postimg.cc/dh68gLDw-
This topic was modified 11 months, 2 weeks ago by
VFSJason.
The page I need help with: [log in to see the link]
-
This topic was modified 11 months, 2 weeks ago by
-
Hey @vfsjason,
I checked your site and it seems that the shortcode is working.

What am I missing here?
P.S.: If a moderator is reading this, the credentials shared above by the OP are just the user/password combo to access a password protected site (.htpasswd authentication). They’re not WP credentials.
-
This reply was modified 11 months, 2 weeks ago by
Hector Cabrera.
The section was blank for literally days up until just now. I’ve messed with various settings so perhaps that’s the cause.
Even so, I have it set to show 5 posts, yet only 1 is in the list. Any idea why that is the case?
https://postimg.cc/zV065wdcThe shortcode will list up to N posts (in your case that’s 5), assuming that there’s enough data to list N posts in the first place.
From the Parameters documentation page:
limit: Sets the maximum number of popular posts to be shown on the listing
Since yours seems to be a site that’s currently being developed and that the only traffic it gets is yours / your team’s I think it’s to be expected that it’ll only show as many posts as you/your team has/have visited within the selected time range.
For example, I just visited some of your posts and I can see 4 posts on your popular section now.

True, this is a dev site, but was a duplication of the production site, which had WPP installed and posts dating back many years. There’s a several year gap between old posts and new posts, well, there’s nothing new, actually, so I set the Custom Time Range to 1500 days and it shows the 900+ views on the 5 Most Viewed posts.
This was the custom date range I set a couple weeks ago and they were showing on the front-end via the shortcode. Then the list disappeared, I disabled the Data Caching and disabled loading via AJAX, to see if that helped and nothing changed up until the point I created this thread.
I suppose this question has morphed into new questions of:
- Is the custom date range too large?
- Is there a delay between setting the range of the Stats and when it actually updates on the front-end? Because even at the 30d range, the top 5 have 9, 4, 3, 3, 3 views and the front-end lists 1 view for each.
Is the custom date range too large?
I don’t see why it would be so nope. As long as the server can handle it (it looks like it should from your Stats page screenshot.)
Is there a delay between setting the range of the Stats and when it actually updates on the front-end? Because even at the 30d range, the top 5 have 9, 4, 3, 3, 3 views and the front-end lists 1 view for each.
The question you should be asking yourself right now is this: is the configuration I’m using with the shortcode (which you haven’t shared yet, btw) the same vs the Stats screen? (As in: time range, category/taxonomy filters, post type(s), etc.) Because if they’re not the same then obviously there will be a discrepancy.
… unless you’re literally using [wpp] as is, with no parameters at all? If so then know that when no parameters are present then the shortcode will default to listing the most viewed posts from the last 24 hours (as stated in the documentation).
And no, there’s no delay 😛 If Data Caching is disabled the data will be pulled live from the DB, same as the Stats screen.
Oh… that’s neat. Yes, was using the default [wpp] shortcode. My designer, nor I, came across that Github page with the available parameters. That definitely helps!
Thank you! -
This reply was modified 11 months, 2 weeks ago by
The topic ‘Shortcode stopped working?’ is closed to new replies.