I am trying to output a usermeta field using the following shortcode generated by Types:
[types usermeta='member-email-verified' current_user='true'][/types]
I have also tried the shortcode with output="raw" but this did not resolve the issue.
To recreate, head to hidden link and set up a test account. The page it directs you to will show the text "() Your Associate member account request is pending.". The shortcode should output the field value between the brackets.
Can I get access to the backend to look at how you have this set up?
I will mark your next reply as private so that I can get log-in credentials from you—you may want to create a temporary admin user for me to use that you can later delete. And be sure to have a current backup of your site.
and it works. I updated your shortcode that is wrapped in the conditional shortcode to match, and it also works. See the screenshot.
In both cases, '1' is being output.
That is the saved value of the field.
If you want to display something else, e.g. the same text as the label, then you should specify that text in the settings, under "Show one of these values", so that when the value is 1 it shows "Email has NOT been verified", or whatever is appropriate.
The test user with username tssupp can be deleted when you have confirmed how it works.
Thanks for your assistance Nigel, the issue still persisted for me even after the above changes to the shortcode & conditionals. I had found it to be intermittent, working for a while and then not after a while with no code changes made.
I think the issue was that despite the default field value being specified, the field was not included in the user registration form or in the php for when the form was submitted. My guess is that that meant the default field value displayed when looking at the user meta in wp-admin but that it wasn't actually saved to the database when the user was created.