WordPress Add [cdata] to title tag in rss feed

is_feed() acept only one parameter to specify the feed type you want to check, like rss, atom, and so on. job_feed is not a valid feed type.

If you want to modify title of feed posts of some type, something like this should do the job:

I think this code should work:

add_filter( 'the_title_rss', 'job_modify_post_title' );
function job_modify_post_title ( $title ) {
    if ( 'your_post_type' === get_post_type() )
       $title="<![CDATA[" . $title . ']]>';   

    return $title;
}

Leave a Comment