Display Certain Profile Fields in Sidebar
-
Hi,
I am trying to place information from certain profile fields in the sidebar whenever a persons profile is displayed. I think I also want to to stay there in the sidebar as long as a user is viewing that profile. Anyhow, I can get it to display and work like that except for the formatting. No matter how the users fills in that data using the WYSIWYG editor it all runs together. Here is the code I am using:
$profile = bp_get_profile_field_data('city partners'); if ( !empty($data) && strlen($data) > 0 ) { echo "<h4>City Resources</h4>"; echo $profile; }
It displays all together like this:
City Hall Ut et dui pulvinar diam suscipit cursus. Nulla est tellus, rutrum non euismod nec, rutrum et ligula. Etiam eget nunc congue, convallis dolor eget, volutpat arcu. Sed velit tellus, pretium eu ante eu, auctor laoreet sapien. Gramercy Park Suspendisse sollicitudin tempus mauris, quis sollicitudin nisi euismod ac. Sed sit amet tincidunt nibh. Aenean non magna mauris. Link hereor if a single line it all just runs together. In the body of the profile page it looks like it does in the editor and how it should with the formatting:
City HallUt et dui pulvinar diam suscipit cursus. Nulla est tellus, rutrum non euismod nec, rutrum et ligula. Etiam eget nunc congue, convallis dolor eget, volutpat arcu. Sed velit tellus, pretium eu ante eu, auctor laoreet sapien.
Gramercy Park
Suspendisse sollicitudin tempus mauris, quis sollicitudin nisi euismod ac. Sed sit amet tincidunt nibh. Aenean non magna mauris. Link here
———-
All nice and neat which is how I want it. How can I keep the formatting, spacing, line breaks, etc.?
Thanks,
StanI am running the BuddyPress 4.1.0 and WP 4.4.9.
- You must be logged in to reply to this topic.