Conditional label display for data elements inside [profile_by_url] custom page – UserPro Forums https://forum.userproplugin.com/forums/topic/conditional-label-display-for-data-elements-inside-profile_by_url-custom-page/feed/ Sun, 19 May 2024 05:57:19 +0000 https://bbpress.org/?v=2.6.2 en-US https://forum.userproplugin.com/forums/topic/conditional-label-display-for-data-elements-inside-profile_by_url-custom-page/#post-23570 <![CDATA[Conditional label display for data elements inside [profile_by_url] custom page]]> https://forum.userproplugin.com/forums/topic/conditional-label-display-for-data-elements-inside-profile_by_url-custom-page/#post-23570 Fri, 28 Feb 2014 15:54:28 +0000 Tim G. Hi,

I couldn’t find a reference to this on the forums, so I am not sure whether what I am trying to do is something you’ve already supported or if this is really a feature request. Definitely appreciate any help you can provide to so I can make this work.

Details: I built a custom profile page using the [profile_by_url] shortcode and the various other specific shortcodes where I want each data field to appear in my layout. On the sidebar, I want to list out the contact information like this:

<h4>CONTACT ME</h4>
Location: [location]
Office Phone: [office_phone]
Mobile Phone: [mobile_phone]
Assistant: [assistant]
Email: [user_email]
Website: [user_url]

The shortcodes have a conditional display behavior where they only show if there is data in that field. That’s perfect. However, I want to have the labels for each item appear and I need that same display logic to also apply to each label (e.g. the label only shows if there is also data to go with it). Is there a way to call the label via the shortcode? (e.g. [user_email label=1] or something like that)? Is there a way to make this work?

I’ve almost got this working the way I want, but in the longer-term I need a solution where I can hand this to someone with minimal programming knowledge and let them manage the content from within the WP admin interface.

Thanks in advance for your help/consideration with this!

-Tim

]]>