Well, this is getting quite off-topic now haha. I’ll help you with this last thing but please keep next inquiries WPP related. All non WordPress Popular Posts questions please consider posting them on the Developing with WordPress forum or on Stack Overflow. Here I can only provide support for WordPress Popular Posts related stuff (otherwise I’d go crazy answering questions about my plugin and general WordPress stuff, and that’s not what this particular forum is for).
With that being said, I’d go with the cronjob solution and this script. And yes, personally I’d create a separate cronjob for this.
Yes, personally I cannot see this working anyway, due to:
When you log in you see the non-cached version of the website (caching plugins as WP Rocket won’t show the cached version of the site to administrators by default, unless you configured it to do otherwise) hence the list looks as expected;
When you’re logged out (or when a visitor checks your site, like me) they see the cached version of your website which for some reason doesn’t have the CSS rules that convert the list into a grid.
That is anyone viewing the website that is not an admin will not see the grid effect.
However, checking out my theme (Total by WPExplorer) I’ve just found a ‘custom actions’ panel, where you can add scripts, shortcodes, hooks and PHP codes that might otherwise get stripped out by WordPress.
I’ll try the cron-job and script that you suggested to make the WPP grid work for logged out users.
Nope – it was as I expected.
Logging out loses the grid effect.
Some things are not meant to be, I suppose.
Finally, I thought that I’d test your theory that it’s a caching problem, so I turned off WP Rocket.
Guess what?
The grids all fired up straight away!
I’ve sent Rocket Support a message to confirm this 🙂
Finally marked as resolved, due to me changing my caching over to Litespeed Cache and having flawless WPP grid galleries and sidebar widgets with no hassles.
Thanks, @hcabrera
Awesome, glad to know you were able to figure it out @deeveearr! Good job!