Skip Navigation

[Résolu] Types user fields, php questions

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

This topic contains 6 réponses, has 2 voix.

Last updated by dariuszP Il y a 8 années et 3 mois.

Assigned support staff: Bigul.

Auteur
Publications
#149957

Hi, I have a few questions.

Are user fields created with Types, accesible by standard user meta functions in wordpress?
How to set up a value, using php to a user field created with Types?
If I create a user with php, does the creation of a types user fields is done automaticly?

#150104

Bigul
Supporter
2013-10-17_1658.png

Dear Dari,

You can Types fields with standard User Meta fields, like the following.

get_post_meta(get_the_ID(), 'wpcf-review-intro', true);

You can use update_user_meta function for updating the Types User Meta Fields by code, please check this link for more details http://codex.wordpress.org/Function_Reference/update_user_meta

Please check the attached image, you choose a User role when you create User meta Field Group and fields will be available for the user belonging to that user role.

--
With Regards

Bigul

#150216

Thnx for your answer. It makes everything clear for me.
One more thing, is it possible to add category list as a user field (in form of check boxes) using Types?
I don't think it is out of the box functionality, but maybe with some hooks and coding.

#150527

Bigul
Supporter

Dear Dari,

Types is helpless for this purpose.

You can do it using our CRED plug-in, it will allow you to create forms for Post Types(Post,Page and Custom Post Types), please check this link for more details
https://toolset.com/documentation/user-guides/#CRED


With Regards

Bigul

#150810

Yes, but I need to make checkboxes based on categories in admin panel in user settings page. And state of chceckboxes should be part of user meta, just like other fields I created with Types using "user fields". Can I put forms created with CRED in user settings page?

#151231

Bigul
Supporter

Dear Dari,

Sorry, it is not possible. Because Category is not a User Meta field.


With Regards

Bigul

#151749

Ok, thank you for your help.