Question

I'm trying to alter a feed for my plugin's custom post type to add lines for podcasting. Here is the code I've got right now:

add_action ('init', 'my_plugin_init');

function my_plugin_init() {
    if ( is_post_type_archive('my_plugin_custom_type') ) {
        add_action('rss2_ns', 'my_plugin_podcast_ns');
    }
}

function my_plugin_podcast_ns() {
    echo 'xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd"';
}

The archive for this post type is located at http://example.com/custom_type/, and I'm getting the feed at http://example.com/custom_type/feed/. However, my extra line is not showing up. What am I doing wrong?

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with wordpress.stackexchange
scroll top