Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor Dan (a11n)

    (@drawmyface)

    We can’t help with custom development. You may want to consider hiring a developer to help with this:

    https://jobs.wordpress.net/

    https://codeable.io/

    Thread Starter Panos_M

    (@panos_m)

    Hello,

    in case somebody has the same issue, the following code working great for adding the ![CDATA] in the <title><?php the_title_rss() ?></title>

    //Add cdata to job posting feed title 
    add_filter( 'the_title_rss', 'job_modify_post_title' );
    function job_modify_post_title ( $title ) {
        global $post;
        if ( get_post_type( $post ) == 'job_listing' ) { 
           return '<![CDATA[' . $title . ']]>';   
        }
    }

    Now i am try to adding ![cdata] to the feed title <title><?php wp_title_rss(); ?></title>

    Any help is appreciated

    Thread Starter Panos_M

    (@panos_m)

    For adding ![CDATA] to the feed title <title><?php wp_title_rss(); ?></title> the above code make it work

    //Add cdata to feed title 
    add_filter( 'wp_title_rss', 'add_cdata_to_feed_title' );
    function add_cdata_to_feed_title ( $title ) {  
           return '<![CDATA[' . $title . ']]>';   
    }
    xavier_bs

    (@xavier_bs)

    Cool, I had the same issue with HTML chars in rss titles.
    Your post helped me a lot

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Add ! [CDATA] to title tag in xml feed’ is closed to new replies.