I want to change my user name

How friendly are you with databases? The simpliest way is to change it in database directly. You need to check table WP_users and WP_users meta. Everything else is according to ID of that user and gravatar is checking your email so there is no problem in changeing it in database. Unfortunately you can’t do it … Read more

Get usermeta info from sql query

You can use meta_query to specify what conditions you want to meet with that query you are performing. i.e.: // grab some record from DB with a specific meta query $args = array( ‘post_type’ => array( ‘woo_commerce_something’ ), ‘orderby’ => ‘rand’, ‘posts_per_page’ => -1, ‘meta_query’ => array( array( ‘key’ => ‘meta_something_woo_commerce_email’, ‘value’ => ’email@[email protected]’ ) … Read more

Add a sub menu page to the Users menu

Happy New year to all. Happy to answer about wordpress in New Year. Hi, You are trying to link an admin page in navigation menu. Admin page can’t be accessed without logging in. Also the url wp-admin/users.php?page=business&user_id=2 can be accessed by user with id 2. If you wanted to create new page then go to … Read more

Creating a user from a different website

No, you cannot create a user on another install – you need access to the main site (either via WordPress admin or the database). The “Website” field on the “Add New User” form is nothing more than a profile field for storing information about the user (in this case, a URL).

Groups and subgroups for permission

First you need to make group and subgroup. You can use wordpress existing User Role or you can make custom user role (group) by own. Members is a nice plugin to create custom role. For example your main group is “Group1” and subgroup is “Subgroup1”. First you need to check current user role (Group of … Read more

How to make current user’s avatar + display name link to their profile?

Use get_the_author_link() or get_the_author_meta(‘user_url’, $user_id). Your code would become something like: $author_link = get_the_author_link(); $header .= ‘<div><a href=”‘. $author_link . ‘”>’ .get_avatar($user_ID, 64).'</a></div>’; $header .= ‘<div><strong><a href=”‘ . $author_link . ‘”>’ . __(“”, “front-end-pm”).’ ‘. fep_get_userdata($user_ID, ‘display_name’, ‘id’) .'</a></strong>’; Watch out with the quotes though, your code seems to use double quotes, I tried to … Read more

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