Unit content shortcode based on profile fields

Please add the code form the gist in your wplms-customizer.php file in wplms customizer plugin :


In example we have “Gender” profile field for and “Male” and “Female” profle field values .
Here’s how we can use the shortcode after adding the code :

[unit_content_profile_field profile_field=”Gender” profile_field_value=”Male“] This content  is for male [/unit_content_profile_field]
[unit_content_profile_field profile_field=”Gender” profile_field_value=”Female“] This content is for female [/unit_content_profile_field]

Note that the shortcode has two parameter :
profile_field  where you put the profile field
profile_field_value where you put the profile field value .

NOTE : Profile field value and profile field names are case sensitive

Was this article helpful?

Related Articles

Leave A Comment?