PDA

View Full Version : Help with passing Variables in this link



gearupandplay
07 Apr 2017, 10:32 AM
I’m trying to create a link on a members blog posts by pulling two fields from their profile.
1st Field: Website Name
2nd Field: URL to website

I was trying the following code but it don’t work.


<a href="<?php echo xprofile_get_field_data( 'Your Website URL', get_the_author_meta( 'ID' ) ); ?>"><?php echo xprofile_get_field_data( 'Your Website Name', get_the_author_meta( 'ID' ) ); ?></a>

Note: Alone each code does work in calling the right information. Can anyone point me in the right direction

gearupandplay
07 Apr 2017, 08:58 PM
OK I figured this out sort of. The link being echoed is coming from a URL form field and it is already a Hyperlink. I assume this is messing everything up when I try to create a link using it. Anyway I can call the Website URL and only return plain text?