Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to access custom fields in PHP #208

Open
jezaman opened this issue Mar 14, 2021 · 2 comments
Open

How to access custom fields in PHP #208

jezaman opened this issue Mar 14, 2021 · 2 comments

Comments

@jezaman
Copy link

jezaman commented Mar 14, 2021

Can you please add a very basic example on how to actually use custom fields?
Very basic info is missing.. like where are the fields even stored and how are they accessed?
I did a var_dump of get_userdata and get_user_meta and i can't even find the fields i added?

@devdarren7
Copy link

devdarren7 commented Apr 8, 2021

` <?php
$weight = get_user_meta( $current_user->ID, '*',true);

echo '

';
echo '

'; $prefixes = 'Week_'; $meta = get_user_meta( $current_user->ID );

echo '

'. json_encode($meta) . '
'; ?>`

@devdarren7
Copy link

I still cant loop through nicely in PHP but i dumped it with js and worked it from there

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants