[podlove-web-player] shortcode not display on homepage

Apologies if I’m missing something obvious - I’ve installed the Podlove Publisher plugin but I can’t get the [podlove-web-player] shortcode to display on the home page. It works for the Episodes pages, but I can’t replicate it on the home page - is that typical behaviour? If so, is it possible to get the Web Player to display on other pages?

The site is at www.mindofyourown.co.uk

Dave

What do you mean by “home page”? By default, the home page is automatically constructed out of most recent posts. In your case I think you are talking about a separate WordPress page, right?

Problem is, the [podlove-web-player] shortcode needs the context of which episode to show. Right now, it is not possible to display the player for a specific (or the most recent) episode using that shortcode.

You can however create a Podlove Template that’s brings up the player for the latest episode and insert it into the page using the [podlove-template] shortcode. If you like I can give you an example.

Here is the code that does what you need:

{% for episode in podcast.episodes({ orderby: "publicationDate", order: "DESC", limit: 1 }) %}
    {{ episode.player }}
{% endfor %}

Create a new template in Podlove -> Templates and call it “latest-episode”. Then you can insert it at any page with

[podlove-template id="latest-episode"]

And you’re done.

Read more about templates in our documentation: http://docs.podlove.org/reference/template-tags/

1 Like

Thanks very much for such a detailed reply - all of your assumptions are correct! I’ll have a play around with the templates and see if I can get that working as I need.

Thanks again,

Dave

Sorry, one more thing - the template code works (thanks!), but is it possible to display a list of recent episodes within the player (e.g. image below instead of a tabled list) via the template editor?

Unfortunately the player only supports one episode at a time. it is not designed to show a list of episodes.

It’s something that comes up every now and then but we haven’t a solution for that yet.

Ah, that’s a shame! Thanks for all your help.