Display episode number in Wordpress theme

Hello,

I would like to have the episode number output as a simple number in my Wordpress theme. How can I output the episode numbers in the theme? Can I do that with PHP or a detour?

You can do this under Podlove->Templates.
There is a default template.
Add the following line and see what happens:

<p>#{{episode.number}}, {{ episode.publicationDate.format('j. F Y') }}.</p>

Bernhard

1 Like

Dear raha,

thank you for that hint. But that only works in the Podlove Template, right? But I want to add it to the metadata on the website (wp post meta). But not in the title, so what Podlove does in the title on request, I want to display in a freely selectable place. That must work somehow, right?

Patrick

Other approach: Is it possible to specifically embed a template somewhere in the Wordpress Theme? This will surely be the death to the loading speed, but at least a maybe work around?
@timpritlove & @ericteubert are you reading this threat?

The answer by @rahra is correct: use a Podlove Template. You can then embed this template using the template shortcode anywhere you like. There is also a PHP template API if you want to have the logic directly inside your theme.

See https://docs.podlove.org/podlove-publisher/guides/understanding-templates.html

1 Like