Skip to:
Content
Pages
Categories
Search
Top
Bottom

Conditional content display based on xprofile field values


  • mistercyril
    Participant

    @mistercyril

    Hello,

    I would like to be able to render an image in the sidebar, when viewing a profile page, that is selected based on the content of a extended profile field value.

    My field name is “office” and the values are contained in a select box. What I would like to do is name each image like its corresponding select box value (i.e. value1.jpg), i suppose this would make the code easier to implement.

    I know I have to start off with :

    `

    The code here
    `

    But the rest is impossible for me. I’ve been fiddling around with code, but I don’t understand how the same code doesn’t work when in different areas of the BP templates. So if someone could help me out, i’d be really greatfull.

    Thanks,
    C.

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

  • mistercyril
    Participant

    @mistercyril

    Up


    mistercyril
    Participant

    @mistercyril

    anyone? really?


    mistercyril
    Participant

    @mistercyril

    Has everyone suddenly deserted BuddyPress for another platform i’m not aware of? The documentation is very very very “light” here, and if no one pitches in anymore this plugin is going to die off…

    I figured something out so here’s the code in case someone wants to achieve the same thing:

    ` // Check to see if you are currently displaying a member profile page.
    // Replace xProfile_field with the profile field name.
    // Display value of profile field

    `

    Thanks,
    C.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Conditional content display based on xprofile field values’ is closed to new replies.
Skip to toolbar