Is it possible to change the layout as we could with the classic widget? I was using the “Tiles” theme and I would like to carry on using it.
Can I also remove how many views is shown publicly?
Also placing the shortcode into the Text Widget results in ‘>>’ being displayed next to each post in the list. I’m not sure if there is a way to remove that.
Its a fantastic plugin and I really want to carry on using it.
The page I need help with: [log in to see the link]
Yes it’s possible but it’s not as straightforward as using the classic widget (the WordPress Popular Posts block is a direct replacement to the classic widget as it’s as easy to use, but if using blocks isn’t an option for you then yeah you’ll need to use the shortcode instead).
To replicate the Tiles theme with the [wpp] shortcode use this configuration:
The only parameter that you may want to adjust in there is the range parameter. It’s the equivalent to the Time Range dropdown from the classic widget. Possible values are: last24hours, last7days, last30days, all, custom (see Parameters for more details).
You will also need to add these CSS rules to your site (eg. via WP Dashboard > Appearance > Customize > Additional CSS) in order for the shortcode to be styled as the Tiles theme.
You may need to tweak some things here and there. If you need help with anything else please don’t hesitate to reach out again.
Hmm, your popular posts list seems a bit broken for some reason. Could you please take a screenshot of your Text widget (Appearance > Widgets > [Your Sidebar]) and share it here?
I have attached the screenshot. I don’t know if this is anything to do with it, but when I reload the Widgets page the Text widget will display the ‘Visual’ tab by default.
This reply was modified 2 years, 10 months ago by DeanSaliba.
Ah, my old friend Visual tab and its tendency to mangle shortcodes with HTML code. Had completely forgotten about that…
Alright, here’s an alternative that seems to work fine. Follow the same steps as before but instead of using the Text widget switch to the Custom HTML widget, then please add the following line of code to your site either via your theme’s functions.php file or via the Code Snippets plugin for example:
add_filter( 'widget_text', 'do_shortcode');
If everything went well your popular posts list should render now as expected (not broken haha). Once you’ve confirmed that please let me know if you’re still seeing those bullets and I’ll have another look.