-
Author
-
June 23, 2016 at 05:22 #126464dsnicheParticipant
On the profile page, I have several fields with multi-line text area. Some people write long texts in these boxes and the problem is that the line breaks don’t appear.
For example I write two paragraphs, hitting enter twice so there’s a line break between them in the text editor. When I save the text, it appears on the front end without the line break so the paragraphs are close together, which can look cramped.
I attached screenshots to show what I mean.
How do I make it so the line breaks appear on the front end?
Thank you.
Attachments:
You must be logged in to view attached files.June 24, 2016 at 00:53 #126628LauraModeratorHello, will assign the ticket to a higher support level who can help and advise you in your query.
Thanks! ?Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionLaura Solanes - Graphic Designer and Web Designer
Please be patient as I try to answer each topic as fast as i can.
If you like the theme or the support you've received please consider leaving us a review on Themeforest!
Always happy to help you 🙂
June 24, 2016 at 18:37 #126762RaduModeratorHi,
Try to add this line into child theme functions php (wp-cotent/themes/sweetdate-child/functions.php)
COPY CODEadd_filter( 'xprofile_get_field_data','wpautop' );
Another possible solutions here : https://buddypress.org/support/topic/line-breaks-in-profile-fields-descriptions-not-showing/
Cheers
R.Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionJune 24, 2016 at 23:12 #126809dsnicheParticipantHi Radu,
I appreciate the help.
I tried the code you gave me above but it didn’t work.
I’m not sure how to implement the possible solution from the buddypress forum. I tried inserting “echo wpautop($data);” and it didn’t work either.
Any other ideas?
Thank you.
June 27, 2016 at 17:26 #127032RaduModeratorHi,
No problem,
I’ve understand that not works, please try also this solution : https://buddypress.org/support/topic/no-html-allowed-on-front-end-profile-page/ see latest reply
Cheers
R.Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionJune 29, 2016 at 10:05 #127342dsnicheParticipantHi Radu,
Thanks for the suggestions.
The file referenced in that thread is in plugins/buddypress/bp-xprofile/bp-xprofile-filters.php — is it safe to edit this file?
Also, it’s an old thread so I’m not sure if it’s still relevant, because on line 48 is this: “add_filter( ‘xprofile_field_name_before_save’, ‘force_balance_tags’ );”
June 29, 2016 at 18:51 #127421RaduModeratorHi,
Backup the file before you will change it after that backup again the file with the modification by renaming something like that
original-bp-xprofile-filters.php
modified-bp-xprofile-filters.phpAlso the modified file should be saved on your computer when the plugin will be updated the file will be overwritten
Cheers
R.Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionJuly 5, 2016 at 04:19 #128047dsnicheParticipantHi Radu,
I couldn’t get it to work by adding add_filter( ‘xprofile_get_field_data’,’wpautop’ );
Maybe I didn’t put it in the correct place? Do you know where exactly in the file to add it in? The thread is 3 years old so maybe the placements have changed.
Thank you.
July 5, 2016 at 17:55 #128095RaduModeratorHi,
If you need to have multiple lines use Multi-line Text Area instead your current field type.
It will render like this
Cheers
R.Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution -
AuthorPosts
You must be logged in to reply to this topic.