Extend user search in the Wp backend area on the users.php page to allow for searching by email domain and role from the “users search” input box

You can do this more simply by using the pre_get_users hook, grab the search string extract the role from it and add that as a role parameter for WP_User_Query. Edited my original code, here’s a refined version, bit cleaner. Additional edit: Scroll further down for update (see follow-up). class wpse_410251_user_search { private $role = false; … Read more

How can I make a search term redirect to a page

You could use the template_redirect hook. https://developer.wordpress.org/reference/hooks/template_redirect/ add_action(‘template_redirect’, ‘wpse410342_template_redirect’); function wpse410342_template_redirect() { if( !is_search() || is_admin() ) return; global $wp_query; if( ‘123456’ === $wp_query->get(‘s’) ) wp_redirect( get_permalink( get_page_by_title(‘Page Name’) ) ); } Using the page slug instead of name. wp_redirect( get_permalink( get_page_by_path(‘page-name’) ) );

Why custom search engine only searches in post titles of custom posts?

The default WordPress search query only works on post_title and post_content fields from the wp_posts table, not including meta stored on the wp_postmeta table. It really depends on what type of search you want to perform how you could solve this, for instance, “full text”-type search, require a match on a given post meta, custom … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)