• Resolved flyangel

    (@flyangel)


    I have set the Feedzy RSS widget to show the titles of the articles of categories A, B, C, D, and works fine, …but if I have an article that belongs to two categories (both A and B), the RSS widget shows a double title in the feed.

    Is there any way to avoid this problem?

Viewing 1 replies (of 1 total)
  • Thread Starter flyangel

    (@flyangel)

    Ok solved

    // Remove duplicates from rss widgets
    function tifd_feedzy_remove_duplicates( $items, $feedURL ) {
    	$uniques = array();
    	foreach ( $items as $item ) {
    		if ( isset( $uniques[ strval( md5( $item->get_permalink() ) ) ] ) ) {
    			continue;
    		}
    		$uniques[ md5( $item->get_permalink() ) ] = $item;
    	}
    	return array_values( $uniques );
    }  
    add_filter( 'feedzy_feed_items', 'tifd_feedzy_remove_duplicates', 10, 2 );
Viewing 1 replies (of 1 total)
  • The topic ‘Problem with an article that belong to two categories (the title is duplicated)’ is closed to new replies.