Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
* Unique Title Checker Across Post Types
* @package unique-title-checker-across-post-types
* @author Bernhard Kau
* @license GPLv3
* @wordpress-plugin
* Plugin Name: Unique Title Checker Across Post Types
* Plugin URI:
* Description: Changes the query for the "Unique Title Checker" plugin to check for duplicate title in any post type
* Version: 1.0.0
* Author: Bernhard Kau
* Author URI:
* Text Domain: unique-title-checker-across-post-types
* License: GPLv3
* License URI:
* Remove the filter on the post type so the uniqueness is checked against all post types.
* @param array $args The WP_Query arguments for the uniqueness query.
* @return array
function unique_title_checker_across_post_types_arguments( $args ) {
unset( $args['post_type'] );
return $args;
add_filter( 'unique_title_checker_arguments', 'unique_title_checker_across_post_types_arguments' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment