Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
User meta data consists of key-value pairs pertaining to the according user ID.
3
votes
2
answers
1k
views
How to get custom user meta by id in custom Gutenberg block
As the title says, I just need to get user meta by the user ID in a custom Gutenberg block (editor side). Essentially what this would return in PHP: get_user_meta( $user_id, 'meta_key', true ); is the …
3
votes
Accepted
How to get custom user meta by id in custom Gutenberg block
With thanks to @Lovor's investigative answer, here's the approach that worked for me.
1. Add meta to REST as JSON:
In the plugin or theme functions, get the meta, maybe_unserialize it, json_encode it, …