I had a post custom field radio for allowing the user to change their images in their custom post, but I decided to change from a custom post field to a custom user field, that way I can select the user and all his or her posts would allow or not to change their images.
So this user custom field slug is "mudar-fotos" and I added to the code below in Views:
Unfortunately it did not work. I thought all custom fields (posts and users custom fields) used the prefix "wpcf-"
I tried adding your code but also, it's not showing anything. Do I have to add "[types usermeta='mudar-fotos' user_current='true' output='raw'][/types]" to the front-end content tab in settings? I mean, I don't think it's a custom code, right?
I need to check on your install whats going wrong there. Can you please share problem URL where you added the conditional statement as well as wp-admin access details.
Please share access details of specific user if needed if I need to loggedin as different user than admin.
I have set the next reply to private which means only you and I have access to it.
For some reason the conditional display is working only after I change the User settings and the default settings are not taking precedence. Here is a video explaining - hidden link
If the form you are using is the same before using which you are creating the user - for all custom fields for which you want to add a default value you need to add it as before:
For example:
add_action('cred_save_data','func_set_default_value_forusers',10,2);
function func_set_default_value_forusers($post_id,$form_data) {
if ($form_data['id']==128) {
$limit_user_posts = 2;
update_user_meta($post_id, 'wpcf-numero-de-anuncios-pagos', $limit_user_posts);
// setting default value for field mudar-fotos
update_user_meta($post_id, 'wpcf-mudar-fotos', 1);
// you can add same kind of code and replace the custom field name for other fields default values.
}
}