Support » Fixing WordPress » Add ![CDATA] to permalink rss

  • Hello,

    i have this feed
    i am trying to add ![CDATA] to the link tag using the_permalink_rss filter. This is the code i have so far:

    //Add cdata to job permalink rss
    add_filter( 'the_permalink_rss', 'add_cdata_to_permalink' );
    function add_cdata_to_permalink ( $permalink) {
           $permalink = get_post_type_archive_link( get_query_var('job_listing') );
           return '<![CDATA[' . $permalink . ']]>';

    And this is the output <link>http://![CDATA[]]</link> when it should be


    What am i missing here?
    Any help is welcome

  • The topic ‘Add ![CDATA] to permalink rss’ is closed to new replies.