Possible to search by author name with default WordPress search function?

Maybe you can try adding your condition directly in the query string, using something like this function wpse_29570_where_filter($where){ global $wpdb; if( is_search() ) { $search= get_query_var(‘s’); $query=$wpdb->prepare(“SELECT user_id FROM $wpdb->usermeta WHERE ( meta_key=’first_name’ AND meta_value LIKE ‘%%%s%%’ ) or ( meta_key=’last_name’ AND meta_value LIKE ‘%%%s%%’ )”, $search ,$search); $authorID= $wpdb->get_var( $query ); if($authorID){ $where = … Read more

Hook that get’s triggered when the author of a post is changed

There is no special hook to author change. But you can achieve it by using post_updated hook. Example: add_action(‘post_updated’, ‘prefix_on_update_author’, 10, 3); function prefix_on_update_author($post_ID, $post_after, $post_before) { if ($post_after->post_author != $post_before->post_author) { // author has been changed // you can add your own hook here or write your code } } Here is the codex … Read more

How to display a public profile page for registered users with custom slug?

Every registered user can have profile, they don’t need to have posts. To change WordPress author’s profile permalink, paste the following code in your functions.php: function change_author_permalink_base() { global $wp_rewrite; $wp_rewrite->author_base = “user”; } add_filter( ‘init’, ‘change_author_permalink_base’ ); After pasting the code, visit Settings->Permalink Structure under your wordpress admin, to flush the rewrite rules. This … Read more

Change author permalink

you need 3 simple functions and hooks first change the author base: //change author/username base to users/userID function change_author_permalinks() { global $wp_rewrite; // Change the value of the author permalink base to whatever you want here $wp_rewrite->author_base=”users”; $wp_rewrite->flush_rules(); } add_action(‘init’,’change_author_permalinks’); then add users to query_vars: add_filter(‘query_vars’, ‘users_query_vars’); function users_query_vars($vars) { // add lid to the … Read more

How can HTML be allowed in Author Bio?

remove the filter that formats the description. put this in your theme’s functions.php: remove_filter(‘pre_user_description’, ‘wp_filter_kses’); EDIT – I should mention, if you allow random people to register and add their own bio for display on the site, not filtering that text could enable bad things.