• Hi Guy’s,

    Really struggling here and could really do with some expert advice?

    This could be a quite long winded email, but im hoping someone can help here!

    OK here is my current website – http://housemusicpodcasts.co.uk/ each artist on the site has their own podcasts category! An example looks like this – http://housemusicpodcasts.co.uk/cate…ic-polar-bears

    You can then go into the detail of one of the posts where you can then download the podcast etc. For example this page – http://housemusicpodcasts.co.uk/futu…ar-bears/11365

    You will see that ive added the player and itunes subscribe link.

    Anyway this site is really old and im in the process of re-vamping it! Here is the example of the new website and how the podcasts are being displayed – http://www.housepodcasts.com/futuris…0-shane-kehoe/

    On this page ive added the “iTunes and Rss Subscribe links” This has been done by editing the functions page within the theme itself. This is the code ive added:

    // itunes
     function themename_powerpress_player_links($content, $media_url, $ExtraData = array())
     {
     $category = get_the_category();
    $content .= ' '.POWERPRESS_LINK_SEPARATOR .' ';
    $content .= 'Subscribe Via iTunes: <a href="#">iTunes e.g. itpc:// Link </a> <br>';
     $content .= ' '.POWERPRESS_LINK_SEPARATOR .' ';
    $content .= 'Subscribe To Feed: <a href="#">Standard RSS Feed Link</a><br>';
    return $content;
     }
     add_filter('powerpress_player_links', 'themename_powerpress_player_links', 100, 3);

    What i need this to do is display the 2 rss feeds, one for itunes and one for the standard rss. What i mean by itunes is the “itpc://” link.

    On this new site ive setup category podcasting under the powerpress settings, i dont know if this is the correct method or not.

    Please can someone give me some help on this?

    To give you an idea, this was the old coding that was originally added to the old website which seemed to work fine. This code was added to standard post page, but was a bit of a pain as with posts that did not have a podcast the links would still appear.

    The codeing that was used to create this is the following:

    <?php
     foreach((get_the_category()) as $category) {
    $catid = $category->cat_ID ;
    }
    $url = get_category_link($catid) . "/feed";
     $url = str_replace("http", "itpc", $url);
    ?>
     <?php
     foreach((get_the_category()) as $category) {
    $catid = $category->cat_ID ;
    }
    $url2 = get_category_link($catid) . "/feed";
     ?>

    Then this is the code that generates the links on the page itself:

    <img src="<?php bloginfo('template_directory'); ?>/images/46.png" align="absmiddle"/> -
    <a href="<?php echo $url;?>" target="_blank">Subscribe via itunes </a><br />
     <img src="<?php bloginfo('template_directory'); ?>/images/25.png" align="absmiddle"/> -
    <a href="<?php echo $url2;?>" target="_blank">Podcast this show</a><br />

    Is there anyway you could code this into the current functions page?

    Regards

    Tom

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator bcworkz

    (@bcworkz)

    Using the theme’s links filter hook is just fine if it results in what you want. You could enhance your filter function by checking if a podcast actually exists for the subject post, and only then adding the links.

    If you really prefer your second example, you could implement it as a template tag function. Insert your new template tag into whichever templates you want. The function does what’s needed and echoes out the resulting html.

    If you are using a third party theme, I would suggest implementing your changes as a child theme. This way, if the theme were to be updated, you would not lose your changes. If nothing else, it keeps all your changes in one place instead of salted all over your main theme’s files. Much easier to maintain.

    Thread Starter tomuptonuk

    (@tomuptonuk)

    Hi Mate,

    Thanks for your advice! Do you do any freelance work at all? i.e. be able to implement this for me?

    Regards

    Tom

    Is this the same conversation we’re having on the blubrry.com forums: http://forum.blubrry.com/index.php?topic=3511.0

    I sent you a detailed quote last week for developing this solution for your theme. Just let us know and we’ll move forward and get it done under the budget we proposed.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Category RSS Feeds and iTunes Links’ is closed to new replies.