1
vote
3answers
31 views

get_*_meta doesn't always return an array

I find it annoying that functions like get_user_meta or get_post_meta will return an array if the meta key exists or false if it doesn't. This means I need to do a check like so: $meta = ...
0
votes
1answer
28 views

Minimize database queries to user tables?

I'm trying to come up with a strategic way to collect large amounts of usermeta data (and output to the screen) while keeping database queries low. Some pages, like the home page, single pages, and ...
0
votes
1answer
545 views

Updating wordpress user meta data array (unexpected multiple arrays)

So I am trying to update a user meta data array that I have previously stored with this function: function oe_charge_customer( $customer ) { // load the stripe libraries ...
0
votes
1answer
38 views

Array of user ids to list of user names

I'm outputting an array of user ids from metadata like so: $awaygoalby = unserialize($post_meta_data['report_away-scorers'][0]); and I want to change each user id to the user name. So I was hoping ...
0
votes
1answer
23 views

Get user_meta values for a user for an array of meta_keys?

I would like to retrieve the meta_values for an array of meta_keys for a user. Is there a function in WordPress core that offers this functionality? Something that would work like this: ...
0
votes
1answer
45 views

Matching usermeta at registration to categories of content

I'm trying to connect some user_meta data from registration form to some categories set up in admin to filter the presentation on the page. This one is tripping me up because the question has multiple ...
0
votes
1answer
63 views

Get custom_user meta value and add entry

I created a custom user meat value and want to add a new key/value to this array. But somehow I can't get it to work correctly, I always get a new array in side the array so that I always have e new ...
1
vote
1answer
191 views

How to save data of an input field to an array

I'm writing a plugin to edit my profile page. How can I save data of an input field to the database and then display it? This is my code. The first part is the display in HTML: <form method ...
2
votes
1answer
285 views

How do I update a specific object in an array, in user meta?

I have this array, below, to set custom user meta (lh_userbadges) in user_meta but I'm not exactly sure how to update just parts of the array later on... $lh_user_badges = array( ...
0
votes
1answer
119 views

Array: What is this value based on?

I need to do an import of an array of checkboxes, but there is a value that I don't how it is determined. The array is based on a user meta option that I created that shows a list of category ...