Skip to:
Content
Pages
Categories
Search
Top
Bottom

Hiding empty xProfile fields in member-header.php

  • Avatar of Bowe
    Bowe
    Participant

    @bowromir

    Hi guys,

    I’m using the following snippet to display certain xprofile fields in my member-header.php:

    `

    Occupation:

    `

    This works fine, but it also shows when the profile field is empty. So I would like to hide them when empty, but I can’t figure out how to do this. I’m pretty sure @DJPaul made a snippet once, but I could not find it again. I imagine it must have been something like:

    if xprofile field “Country” has data
    Country: United States
    else
    *blank*

    Ofcourse this needs to be proper php (which I can’t write :D). If someone has this working, or could help me figure this out, it would be pretty awesome!

Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.