Hi @webgirl40
Thank you for the explanation! Aggregator uses the item’s URL (by default) or the GUID (if the option is enabled) to identify duplicates. Assuming you didn’t enable the GUID option, we can “hack” Aggregator into thinking that two duplicate posts from different sources are actually different.
We do this by adding something that is feed-specific (such as the feed’s ID) to the URL. This code snippet does just that:
// Make duplicate item permalinks unique per feed
add_filter('wprss_normalize_permalink', function ($permalink, $item, $feed_ID) {
// Break down the URL into parts
$url = parse_url($permalink);
// Add feed ID to the query part
$url['query'] = isset($url['query'])
? $url['query'] . '&_feed_id=' . $feed_ID
: '_feed_id=' . $feed_ID;
// Rebuild the URL and return it to WP RSS Aggregator
return http_build_url($url);
}, 1000, 3);
You can add this code to your website as shown here –?How to Add Actions and Filters.
Note: This won’t affect retroactively affect posts that were already imported. If you need this applied, you need to?delete the previously imported items?and re-import them again. However, please keep in mind that the plugin will only import items that are still available on the RSS feed.