FeedWordPress duplicated posts problem

You can use the “syndicated_post” hook that’s available in FWP and hook in a function that checks for duplicate posts.

add_action('syndicated_post', 'fwp_check_duplicate');

I started working on this a few months back but did not complete it. I basically got to the point of flagging potential duplicates and putting them in draft mode instead of publishing.

function fwp_check_duplicate ( $post ) {
    global $wpdb;
    $handle; 
    $possible_duplicate;

    $query = "SELECT id,guid 
               FROM $wpdb->posts 
               WHERE post_title="%s" 
               AND post_date_gmt like %s";

    $sql = $wpdb->prepare(
                    $query, 
                    $post['post_title'], 
                    gmdate('Y-m-d', $post['epoch']['issued'])."%" );

    $results = $wpdb->get_results( $sql, ARRAY_N);
    foreach ( $results as $result ) { 
        if ( $result['guid'] != $post['guid'] ) { 
            $possible_duplicate = true; 
        } 
    }

    if ($possible_duplicate) {
     $post['post_status'] = "draft";
    }
    // Otherwise continue to process.

    return $post;
}

Hope that helps.

deneme bonusudeneme bonusu veren sitelerpulibet girişOnwin Güncel Giriştürkçe altyazılı pornocanlı bahis casino