Hi @franmat10,
No, currently there’s no way to assign a theme to the shortcode via parameters. That’s a widget-only feature for now.
However, there’s a workaround:
1. Go to Plugins > Plugin Editor and select WordPress Popular Posts from the dropdown.
2. Click on assets > themes > [your-preferred-theme] > config.json to open this config file.
You’ll notice that this config file uses the exact same parameters that are available to the shortcode. The parameters you’re interested in are wpp_start, wpp_end and post_html. Add those to your shortcode and set them up just the same way as you see them on the json file. For example:
[wpp wpp_start="<ul class=\"wpp-list wpp-cards\">" wpp_end="</ul>" post_html="<li>{thumb_img} <div class=\"wpp-item-data\">{taxonomy} {title} <p class=\"wpp-excerpt\">{excerpt}</p></div></li>"]
3. Finally, follow these instructions.
It doesn’t work, perhaps I made some mistakes. I followed the instructions (thanks for the fast reply) but nothing happened.
Here’s the shortcode I used into a page, is it wrong?
[wpp wpp_start=”<ul class=\”wpp-list wpp-tiles\”>” wpp_end=”” post_html=”
Hard to say what’s going on without more details, @franmat10. For example:
- I’d like to see where your popular posts list is so I can see the output, and for that you’ll need to share your site’s URL.
- Are you using the Classic editor or the Block editor (a.k.a. Gutenberg)?
- Do you have a caching plugin installed?
- Etc.
I tried another workaround, using amr shortcode to put it into a page. It works this way but mobile view is terrible.
My aim is using WPP styled list as my homepage. Don’t know if it’s possibile
Well, it’s doable:
- You could alter the main query of your home page so it lists popular posts (this would require some custom coding.)
- You could replace your current homepage with a custom one and place the shortcode there (this would also require some level of custom coding).
- Similarly, you could code a custom template that retrieves popular posts in some way (via shortcode, or using a custom widget, or via custom PHP coding, etc.)
But all of that is out of the scope of support I provide here. You’d need to hire a developer if you’re not familiar with WordPress development in general.