Remove default description element from RSS feed
-
I’m using the rss2_head hook to add some elements to the RSS head for a custom post type. Something like this:
function custom_rss_head() {
if (get_post_type() == ‘videocasts’) {
echo ‘<author>Custom Author</author>’ . PHP_EOL;
echo ‘<description>Custom description</description>’ . PHP_EOL;
// … etc …
}
}
add_action( ‘rss2_head’, ‘custom_rss_head’);This works fine except that WordPress adds its own default <description> element as well. Is there a way to either remove that or override it, but only in case of a specific post type?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Remove default description element from RSS feed’ is closed to new replies.