Skip to:
Content
Pages
Categories
Search
Top
Bottom

Hide xprofile data if 'x'

  • @applegateian

    Participant

    Hi guys

    We have a sidebar custom plugin, where we return different user profile data based on the user type.

    One of these fields returns one of 6 drop down options. However, what I want to do is only one of 5 of the options if selected, and not display the 6th if present. I still need the 6th option but just don’t want to show it in the sidebar.

    Here is the line of code in the plugin to display this data:

     echo " <h2 class='sidebarRole'>".xprofile_get_field_data( 'Role (architect)', get_the_author_id()) ."</h2>";						
    

    Is there a way to say, if the returned result is ‘x’, then don’t display anything?

    Thanks,

    Ian

Viewing 3 replies - 1 through 3 (of 3 total)
  • @danbp

    Participant

    @applegateian

    Participant

    Thanks @danbp

    I read that, and tried a few times, but didn’t get very far.

    Is this the only way to do it?

    Thanks,

    Ian

    @applegateian

    Participant

    @barney92 your photo makes you look like a dancing hotdog…wait…

    Is it really acceptable to come on here and use abusive, offensive slurs like that? Using the word ‘retard’ is completely inappropriate.

    Anyway, this is a support forum, and I am asking for support. Most people are happy to help.

    I am still learning Buddypress so this is a great place to develop. I contribute regularly to WordPress forums and Stack Exchange to help others.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Hide xprofile data if 'x'’ is closed to new replies.
Skip to toolbar