Skip Navigation

[Closed] Display content on page conditionaly based on Custom User Field

This support ticket is created 3 years, 8 months ago. There's a good chance that you are reading advice that it now obsolete.

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.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 4 replies, has 2 voices.

Last updated by Shane 3 years, 8 months ago.

Assisted by: Shane.

Author
Posts
#2190689

Tell us what you are trying to do?
Hi Shane :-),

I hope you can help me with this one aswell??

I am trying to hide/show a CRED from/content on a normal page based on a (User field) Custom Dropdown Field in the user's profile.

So what I'm basically trying to do is the following:
1. User Register using User Form
2. In the form, the user should select a multi-selection to "Register for:" then you have the different registration types.
3. Once selected and registered, the user can only see content on the specific pages based on the selection on the User Form "Register for".

I thought this would be possible using the Conditional Lodgic Block on the page, but not sure how the conditions will work.

I actually managed to use the conditional field to show/hide specific sections in content templates for when a selection on the Post CRED form that created/posted a listing was submitted . That was rather easy because I had an option to select "Post Data" and then selecting the appropriate custom field and entering the value of that field.

Now I'm not sure how to do this with User form Fields. I hope this makes sense.

#2190827

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Marlo,

Thank you for getting in touch.

You can actually do it with the conditional block in the advanced editor mode and using the code below.

  ( ( '[types usermeta='customfieldslug' user_current='true']' eq '' ) ) 

Please let me know if this helps.
Thanks,
Shane

#2191397

Hi Shane, thanks for your quick advice.

I tried the code you supplied using the relevant slugs and values with no luck.
This is the code I used: ( ( '[types usermeta='register-for' user_current='true']' eq 'List a Pet' ) ) in the editor mode. I get this warning/error: "Please, complete all the conditions or remove them". Not sure what I'm doing wrong 🙁

#2192947

Hi Shane, any feedback yet on this issue?

Thanks

#2193137

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Marlo,

Would you mind allowing me to have admin access to the page that you're testing this on ?

I've enabled the private fields for your next response.

Thanks,
Shane

The topic ‘[Closed] Display content on page conditionaly based on Custom User Field’ is closed to new replies.