Skip to content

Instantly share code, notes, and snippets.

@pirate-bot
Created February 26, 2026 08:15
Show Gist options
  • Select an option

  • Save pirate-bot/e0359d3752156d75392ba0d273e40af5 to your computer and use it in GitHub Desktop.

Select an option

Save pirate-bot/e0359d3752156d75392ba0d273e40af5 to your computer and use it in GitHub Desktop.
Remove duplicate feed items via titles.
<?php
/*
Plugin Name: Feedzy tweak - Remove duplicate feed items via titles
Description: When you have a large set of feed URLs that you would like to display. Use this plugin to remove the duplicates based on their titles.
Version: 0.0.1
Author URI: https://themeisle.com
*/
function tifd_feedzy_remove_duplicates( $items, $feedURL ) {
$uniques = array();
foreach ( $items as $item ) {
if ( isset( $uniques[ strval( md5( $item->get_title() ) ) ] ) ) {
continue;
}
$uniques[ md5( $item->get_title() ) ] = $item;
}
return array_values( $uniques );
}
add_filter( 'feedzy_feed_items', 'tifd_feedzy_remove_duplicates', 10, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment