WordPress.org

Support

Support » Themes and Templates » Only showing profile fields that have info in them on author templates.

Only showing profile fields that have info in them on author templates.

  • This is probably really simple to do for someone familiar with php, but everything I know about php I learned chopping it up in wordpress and hoping it worked, so I can’t quite figure out how to do this on my own.

    I’m working on creating an author profile template for my site, and I have it working, mostly. I’ve managed to add custom profile fields, and they all work and I can get them to show up on the profile pages.

    What I’m getting stuck on is this: I need to be able to code the template in such a way that a given profile item only shows up if the user has it filled out. For example, of the 8 of us that write on this site, 3 of use use tumblr. I can code the template to show a tumblr link and it will link to each users blog, but then I end up with a blank link for the users who don’t fill out that field.

    I know I need to use some sort of if then statement to do this, but again, I don’t really know php that well.

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Only showing profile fields that have info in them on author templates.’ is closed to new replies.