copy fields value to another field

You do not need to, instead add the user URL column to the list of searchable table columns https://developer.wordpress.org/reference/hooks/user_search_columns/ Which includes a user contributed example that does this: https://developer.wordpress.org/reference/hooks/user_search_columns/#comment-4605 add_filter( ‘user_search_columns’, ‘wpdocs_filter_function_name’, 10, 3 ); function wpdocs_filter_function_name( $search_columns, $search, $wp_user_query ) { $search_columns[] = ‘user_url’; return $search_columns; } With this, no syncing to a URL … Read more

meta_query search names when they have middle initials

The easiest approach in such cases is to set some other custom field which you’ll use for searching. So if the name looks live that: <first_name> <initial> <last_name> Then you can create another field which will contain: <first_name> <initial> <last_name>#<first_name> <last_name>#<last_name> <first_name> (The # character is a separator, so you should use any character that … Read more

Auto delete empty posts

You want to write a wp_insert_post_empty_content filter. WordPress will already try and reject empty posts: $maybe_empty = ‘attachment’ !== $post_type && ! $post_content && ! $post_title && ! $post_excerpt && post_type_supports( $post_type, ‘editor’ ) && post_type_supports( $post_type, ‘title’ ) && post_type_supports( $post_type, ‘excerpt’ ); but I guess that logic isn’t catching your posts here. So … Read more