Timeline for Is there a limit to the length/size of serialized data that can be stored as user meta?
Current License: CC BY-SA 3.0
12 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Apr 19, 2012 at 19:54 | vote | accept | John | ||
Apr 19, 2012 at 19:54 | comment | added | John | Thx a million for your help. I'll probably ask new question to understand what we could do with custom user taxonomies and queries. Once again, Thx. | |
Apr 19, 2012 at 19:28 | comment | added | Tom J Nowell♦ | Not that I'm aware of, but the lack of support is pointed out in tadlocks article too | |
Apr 19, 2012 at 18:22 | comment | added | John | With posts and post taxonomies you could run a query like $query = new WP_Query( array('books' => 'latin') );. Can't we do something similar with wp_user_query or may be custom $wpdb query and passing custom user taxonomy as the parameter? Rather than loading a variable with array of user object id's. Something on the lines of $user_query = new WP_User_Query( array('profession' => 'developer') ); | |
Apr 19, 2012 at 17:51 | comment | added | Tom J Nowell♦ |
e.g. $users = get_objects_in_term( $practice->term_id, 'practice' );
|
|
Apr 19, 2012 at 17:45 | comment | added | John | Sorry, I did not understand your comment. Let me rephrase my question. I have gone through Justin's article on custom user taxonomy and successfully created them as well. My question now is how do I fetch a list of user objects added to a custom user taxonomy using wp_query or wp_user_query?. I have not found any references to the same in Justin's article. | |
Apr 19, 2012 at 17:20 | comment | added | Tom J Nowell♦ | There's also custom post types, where the term slug is the user login/user ID | |
Apr 19, 2012 at 17:19 | comment | added | Tom J Nowell♦ | A taxonomy is used to classify objects, or more specifically object IDs. Most people use this as in post IDs, and thus assume it means only post IDs. Please refer here: justintadlock.com/archives/2011/10/20/… | |
Apr 19, 2012 at 16:57 | comment | added | John | After lot of deliberation I have finally understood the benefits of using user taxonomies for this need. I ended up creating a user taxonomy with the same name as the username of a User A. And all other users whose ID I earlier used to add to meta data of User A, I now add to the user taxonomy that was created as above. Please advise if this approach is correct? Secondly, I see wp_user_query class for querying users. Not sure how to make it work with user taxonomy. Could you please update your answer with an example on how to run queries to fetch users using user taxonomy? | |
Apr 17, 2012 at 20:51 | comment | added | Tom J Nowell♦ | No more than saving it as user meta, BUT, if you ever needed t do queries on that data it would be much much easier to do it using the taxonomy than to search through user meta | |
Apr 17, 2012 at 19:44 | comment | added | John | Thx for the reply. The data I need to store to user meta would be done for each user registered on the site. In future the user base could climb to 100K users or more. Wouldn't saving the data as custom taxonomy for each user bloat the database? | |
Apr 17, 2012 at 19:29 | history | answered | Tom J Nowell♦ | CC BY-SA 3.0 |