Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Contributor Hugh Lashbrooke

    (@hlashbrooke)

    I’m not 100% sure what you mean by the”default media player”. Do you mean the media player that appears above/below your episode content? Because in that case the title is already on the page, so there’s no need to add it.

    If you clarify your needs a bit then I might be able to assist.

    Thread Starter michaelpfaff

    (@michaelpfaff)

    Yeah, the media player that is automatically added to podcast episodes. My theme is a little different so I need to add the title. Right now, I’m using the shortcode at the top (with title) to replicate the effect and putting the “default” media player on bottom of content.

    Here’s an example.

    https://www.nerdlouisville.org/podcast/episode-7-louisville-arcade-expo-cosplay/

    What I’d like to do is add the title to the “default” media player that’s automatically inserted into the post so I can set it to top of content and don’t have to add shortcode to each post.

    Does that help?

    Thread Starter michaelpfaff

    (@michaelpfaff)

    Also, if I wanted to add an HTML link to a URL that says “Subscribe” that showed up in the details, could you show me how to modify this snippet to make that work?

    add_filter( 'ssp_episode_meta_details', 'ssp_series_title_in_meta', 10, 3 );
    function ssp_series_title_in_meta ( $meta, $episode_id, $context ) {
      $series_title = get_the_term_list( $episode_id, 'series', 'Series: ', ', ' );
      $meta['series'] = $series_title;
      return $meta;
    }

    Thanks so much for your help and the plugin!

    Plugin Contributor Hugh Lashbrooke

    (@hlashbrooke)

    Something like this should work:

    add_filter( 'ssp_episode_meta_details', 'ssp_subscribe_link_in_meta', 10, 3 );
    function ssp_subscribe_link_in_meta ( $meta, $episode_id, $context ) {
      $subscribe_url = 'https://www.example.com/';
      $meta['subscribe_link'] = '<a href="' . esc_url( $subscribe_url ) . '">Subscribe</a>';
      return $meta;
    }

    You’ll just need to change the URL to whatever your subscribe link is.

    I haven’t tested that directly, but adding it to your theme’s functions.php file should do the trick ??

    If this has helped you then it would be great if you could support continued development of the plugin by leaving a review ??

    Cheers,
    Hugh

    Thread Starter michaelpfaff

    (@michaelpfaff)

    Hugh, Subscribe link worked great! Thanks!

    What about adding title to the media player that’s added into the post at the top/bottom of content? That doable?

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Adding Episode Title to Default Media Player’ is closed to new replies.