include user profiles in search results?

I haven’t an ready to use solution. However I think you should enhance the query, so that you have the field of the users inside this. I think the follow example demonstrate it more. The two filter hooks are necessary and get an result for the query like this: SELECT SQL_CALC_FOUND_ROWS wpbeta_posts.ID FROM wpbeta_posts JOIN … Read more

How to stop a user from updating the post date

As @t-f pointed out in his comment to question, you have an error on checking current user capability: ‘delete_published_posts’. $post_author_id simply doesn’t exist. After that, for your scope probably is a better hookin the filter wp_insert_post_data instead of the action save_post: because this one run when the post was already saved / updated, so if … Read more

Setting WP Admin passwords to expire

I was busy writing up a plugin for this without even checking of one already existed. So I did a little research and found out that it does indeed already exist and that the path I was going down was the right one. Well, there’s no need to reinvent the wheel here, so here’s the … Read more

Upload gravatar in WP profile?

If you are looking to connect your sites sign-up with Gravatar then you simply can’t, since Gravatar don’t have a sing-up api you can use. But if you are just looking to let your users upload there own photos the either Simple Local Avatars Plugin that Chip suggested or one I’ve used a lot before … Read more

How to assign capabilities to user NOT to User Role

Finally, I’ve figured out a way to do it using WP_user Class. Snippet to add/remove capability to/from specific user – //to remove capability from user $user = new WP_User( $user_id ); $user->remove_cap( ‘can_email’); //to add capability to user $user = new WP_User( $user_id ); $user->add_cap( ‘can_email’); There is special function in capabilities.php in the wp_user … Read more

Sort get_users by custom field

By using this you can get your result in ascending order for sort_order custom field $users = get_users( array( ‘meta_key’=> ‘sort_order’, ‘orderby’ => ‘meta_value_num’, ‘order’ => ‘ASC’ ) ); foreach( $users as $user ) { echo ‘<h4>’ . $user_info-> user_firstname . ‘ ‘ . $user_info-> user_lastname . ‘</h4>’; }

How to change WordPress user ID?

Why not make a new account for this user which will generate a new database ID. Then delete the user with the ID of 1 and attribute all posts / content to the new user you created for them? Then you don’t have to worry about queries or messing up your database. Also, as said … Read more

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