Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter phoebe46

    (@phoebe46)

    I solved this, with this code:

    add_filter( ‘feedzy_feed_items’, ‘tifd_feedzy_remove_duplicates’, 10, 2 );
    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 );
    }

    Where did you put that?

    What does the 10, 2 signify?

    Thank you

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How can I eliminate duplicate feed items by title?’ is closed to new replies.