Let user select their own category

User taxonomies can help you achieve this, I’m working on something similar. You can install the plugin http://wordpress.org/plugins/user-taxonomies/, and register a custom taxonomy , although in my case the plugin has some limitations, may be it helps you. register_taxonomy(‘profession’, ‘user’, array( ‘public’ =>true, ‘labels’ =>array( ‘name’ =>’Professions’, ‘singular_name’ =>’Profession’, ‘menu_name’ =>’Professions’, ‘search_items’ =>’Search Professions’, ‘popular_items’ … Read more

User meta and public function security

functions.php is not more nor less secure than any other file in your WordPress installation, just like post meta is not more nor less secure than any other table in your WordPress database. That means that they are secure until your site is hacked. So question become “is WordPress secure?” and I think that: that … Read more

SELECT from wp_users, get Displayname too

You will need to do a JOIN on the users table in your old database, and also select the display name. One key thing to note here, is that I aliased dbold_posts as P, and dbold_users as U – when dealing with multiple table, it’s always best practice to specify which table you are referring … Read more

Update user meta array using foreach

Make sure to have identical keys in both of the arrays. Keys ‘first_name’, ‘last_name’ and respective keys ‘fname’, ‘lname’ are different. If you can make them identical then first do it, otherwise you will either need to do string manipulation for these keys before using them or put a condition like below in the foreach … Read more

New User Save Filter

For this, you have to use user_register hook defined on wp-includes/users.php line 1759. personal_options_update hook is called, when an user updating his own profile. edit_user_profile_update is called, when an administrator updating other user profile. nothing is called, when an administrator creating a new user. On user-new.php page, new user are created using the edit_user function, … Read more

Function to pull data from user meta not working

The problem is that when you pass the $key argument on get_user_meta() function, you don’t pass a valid argument. The $key must be a string according to the documentation page. It represents the value of meta_key in the wp_usermeta table. If with wpcf-client-lvl is actually a variable that contains the name of the field ( … Read more

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