Support » Plugin: RSS Aggregator by Feedzy - Powerful WP Autoblogging and News Aggregator » Plugin is removing Amazon referral from RSS feed?

  • Resolved juliantrueflynn

    (@juliantrueflynn)


    Everything is working great with the plugin. 1 issue though is it keeps stripping the referral ID from the Amazon RSS feed I’m putting in there. Any thoughts?

    Example RSS feed:

    http://www.amazon.com/rss/tag/CATEGORYPRODUCT/new?length=100&tag=REFERRALID-20

    This is the part that is getting cut off from the example url above:

    REFERRALID-20

    It’s removed off each single product link that shows. The correct link shows in the RSS feed when viewing it though.

    https://wporg.ibadboy.net/plugins/feedzy-rss-feeds/

Viewing 1 replies (of 1 total)
  • Hi Julian,
    I don’t know why the referal is getting cut off from the url.
    You can add it manually with the following hook bytheway.

    function bweb_feedzy_add_link_param_matches( $matches ) {
        return '<a href="' . $matches[1] . 'REFERRALID-20" target="_blank" rel="nofollow">' . $matches[2] . '</a>';
    }
    function bweb_feedzy_add_link_param( $content, $feedURL ) {
        $pattern= '/<a.*href=\"(https?:\/\/.*)\".*>(.*)<\/a>/iU';
        $content= preg_replace_callback( $pattern, 'bweb_feedzy_add_link_param_matches', $content );
        return $content;
    }
    add_filter( 'feedzy_global_output', 'bweb_feedzy_add_link_param', 9, 2 );

    Hope this helps.
    Cheers

Viewing 1 replies (of 1 total)
  • The topic ‘Plugin is removing Amazon referral from RSS feed?’ is closed to new replies.