Custom Post Type Pagination & duplicate posts

I think the best way to implement this is to use pre_get_posts hook. Take a look at this code function customize_query( $query ) { $post = get_posts(array( ‘post_type’ => ‘projects’, ‘taxonomy’ => ‘featured’, ‘numberposts’ => 1 )); if ( $query->is_home() && $query->is_main_query() ) { $query->set( ‘post_type’, ‘projects’ ); $query->set( ‘posts_per_page’, 6 ); if($post && !empty($post)) … Read more

Duplicates with WP_Query loop

It is quite hard to properly answer your question with the amount of context in your question, but I am going to try to use the context from your previous question Having a bit more context here on template, and if I read this correctly, this is on your index.php, I still believe and stand … Read more

Changing username after registration to get around the issue of having duplicate emails?

You can try this skeleton plugin: /** * Plugin Name: Allow duplicate emails on registration * Plugin URI: http://wordpress.stackexchange.com/a/125129/26350 */ add_action( ‘plugins_loaded’, array( ‘Allow_Duplicate_Emails_Registration’, ‘get_instance’ ) ); class Allow_Duplicate_Emails_Registration { private $rand = ”; static private $instance = NULL; static public function get_instance() { if ( NULL === self::$instance ) self::$instance = new self; return … Read more

Real time Duplicate title check

You can hook ‘save_post’ or ‘wp_insert_post’ (both executed the same in wp_insert_post()) to check for autosaves and notify the author(s) accordingly. The checks that I would do would be to check that the author of the autosave (aka, revision) and the new autosave are not the same, check that the post title is the same … Read more