Multiple podlove buttons


#1

Tried adding multiple buttons in my widget area but i couldn’t add a single one. Cause i dont have podcast on the main site and you can’t define the feed manually.

So i tried adding them on the backend. One feed works but i don’t understand hot to add more. Tried doing it like this:

<script class="podlove-subscribe-button" 
	src="https://cdn.podlove.org/subscribe-button/javascripts/app.js" 
	data-language="en" 
	data-size="big-logo auto" 
	data-json-data="podcastData podcastData2" 
	data-colors="#e63f2a;#e6a62a;#e6682a;#fff;#fff;#fff;#000;"></script>

#2

Hi,

you need to add one script tag for each button you want to display. One tag cannot take more than one set of options.

Regards,
Ben


#3

Here’s an example of multiple elements on the same page:

<script>
    window.podcastData0={"title":"My Podcast","subtitle":"","description":"","cover":"http://www.example.com/podcast.jpg","feeds":[{"type":"audio","format":"mp3","url":"http://www.example.com/mypodcast"}]}
</script>
<script class="podlove-subscribe-button" src="https://cdn.podlove.org/subscribe-button/javascripts/app.js" data-buttonid="podcast0" data-language="en" data-size="big" data-json-data="podcastData0" data-color="#469cd1" data-format="cover" data-style="filled">
</script>
<noscript>
    <a href="http://www.example.com/mypodcast">Subscribe to feed</a>
</noscript>

<script>
    window.podcastData1={"title":"Another Podcast","subtitle":"","description":"","cover":"http://www.example.com/podcast.jpg","feeds":[{"type":"audio","format":"mp3","url":"http://www.example.com/anotherpodcast"}]}
</script>
<script class="podlove-subscribe-button" src="https://cdn.podlove.org/subscribe-button/javascripts/app.js" data-buttonid="podcast1" data-language="en" data-size="big" data-json-data="podcastData1" data-color="#469cd1" data-format="cover" data-style="filled">
</script>
<noscript>
    <a href="http://www.example.com/mypodcast">Subscribe to feed</a>
</noscript>

<script>
    window.podcastDataN={"title":"Yet Another Podcast","subtitle":"","description":"","cover":"http://www.example.com/podcast.jpg","feeds":[{"type":"audio","format":"mp3","url":"http://www.example.com/yetanotherpodcast"}]}
</script>

...

<script class="podlove-subscribe-button" src="https://cdn.podlove.org/subscribe-button/javascripts/app.js" data-buttonid="podcastN" data-language="en" data-size="big" data-json-data="podcastDataN" data-color="#469cd1" data-format="cover" data-style="filled">
</script>
<noscript>
    <a href="http://www.example.com/mypodcastN">Subscribe to feed</a>
</noscript>

Note that the following items must be unique in each script block:

  • window.PodcastDataN
  • data-buttonid=“podcastN”
  • data-json-data=“podcastDataN”