WordPress.org

Ready to get started?Download WordPress

Forums

podPress
[resolved] Change ?feed=podcast Title (9 posts)

  1. soopak
    Member
    Posted 3 years ago #

    Using the Podpress plugin and loving it, however I would like to have the Podcast feed title different from my blog title.

    Inside the Podpress options changing the feed title also affects the blog title, and vice versa.

    I've scoured the net and searched the source but can't seem to find a way to change it. I'm happy to hard-code, but would prefer a more elegant solution.

    If anyone could help I would be most appreciative.

    Thanks!

    http://wordpress.org/extend/plugins/podpress/

  2. ntm
    Member
    Plugin Author

    Posted 3 years ago #

    The next podPress version is going to have an option to modify only the feed title.

    But until this version reaches the 'stable' status, you might use a little filter plugin like this:

    <?php
    /*
    Plugin Name: podPress feed element filter
    Plugin URI:
    Description: filters some of the Feed elements
    Author: ntm
    Version: 1.0
    Author URI:
    */
    
    add_filter('bloginfo_rss', 'pff_modify_bloginfo', 10, 2);
    function pff_modify_bloginfo($content, $feedelementname) {
    	// This filter can filter the Feed title, the URL and the description
    	Switch ($feedelementname) {
    		case 'name' : // Feed title
    			// If it is the feed with the slug 'podcast' replace the title as long as this plugin is active.
    			// ( get_query_var('feed') can also be'feed' (RSS2), 'atom' (ATOM))
    			if ( 'podcast' === get_query_var('feed') ) {
    				// The new Feed title:
    				return 'My Podcast';
    			} else {
    				return $content;
    			}
    		break;
    		case 'description' : // Feed description
    			return $content;
    		break;
    		case 'url' : // Feed URL
    			return $content;
    		break;
    		default :
    			return $content;
    		break;
    	}
    }
    ?>

    Copy this code to a PHP file (name it e.g. podpressfeedelementfilter.php), store it in the plugins folder of your blog e.g. /wp-content/plugins/podpressfeedelementfilter.php, replace My Podcast with your desired value and activate the plugin.

    Regards,
    Tim

  3. soopak
    Member
    Posted 3 years ago #

    Thanks so much, Tim - worked like a charm!

  4. jean.gourdet
    Member
    Posted 3 years ago #

    Thanks for the plugin, it works great to change the podcast title.
    But could you explain how to change the url shown in itunes

    what do I have to change in

    break;
    		case 'url' : // Feed URL
    			return $content;

    in order itunes to show a different url than the one of my blog.

    Thx a lot

  5. ntm
    Member
    Plugin Author

    Posted 3 years ago #

    Hello Jean,

    if you want to tell the iTunes repository a new URL then please don't use this filter plugin. (This filter plugin filters only a few values of the feeds and changing the 'url' with this filter plugin would only affect the URL in the <link> tag of the feed.)

    Use instead the Feed/iTunes settings page of podPress.
    The podPress FAQs and this forum thread (especially the last post) contain descriptions on how to do that.

    Regards,
    Tim

  6. jean.gourdet
    Member
    Posted 3 years ago #

    Thanks for answering,
    but I just want to change the url in the link tag of the feed in itunes.
    It points to http://www.mydomain.com/wordpress/ and I'd prefer http://www.mydomain.com instead.

    So, do I only have to replace 'url' by 'http://www.mydomain.com' ?

    Thanks

  7. jean.gourdet
    Member
    Posted 3 years ago #

    I just tried that, it doesn't seem to work that way. Or I have to wait a bit maybe....

  8. ntm
    Member
    Plugin Author

    Posted 3 years ago #

    Hi Jean,

    if you want to change the URL of your podcast feed in the iTunes repository then use the <itunes:new-feed-url> tag or in other words the related option at the Feed/iTunes Settings page of podPress and of course the Podcast Feed URL field to enter the new URL of the feed. iTunes will take over the new URL automatically after some days.
    And if you already have had listeners which have used the old URL then you should think about making a redirect with such a .htaccess file (or something comparable).

    Why do you think changing the <link> would do the same as the <itunes:new-feed-url> tag? Or why do you want to change the content of the <link> tag?

    If you want to change the content of the content of the <link> tag then you could modify the filter plugin this way:

    case 'url' : // Feed URL
    			$content = 'http://www.example.com/thenewurl'; // The content in this case is the URL. By defining a new $content you can change it.
    			return $content;
    		break;

    This modification will be effective immediately (maybe you have to clear the cache memory of your feed reading program).

    Regards,
    Tim

  9. jean.gourdet
    Member
    Posted 3 years ago #

    Thanks a lot.
    It seems to work great!
    Waiting for iTunes to update....

    Thanks again

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags