-
Author
-
March 22, 2016 at 05:15 #112125liam62244Participant
Pleae see attached post. How can I limit the about me section to maybe 200 or 100 words?
Thanks
Attachments:
You must be logged in to view attached files.March 23, 2016 at 13:16 #112338LauraModeratorHello, try adding this to your functions.php of child theme
COPY CODEfunction filtered_profile_data( $args ) { $data = bp_get_member_profile_data( $args ); $defaults = array( 'field' => false, // Field name 'user_id' => $user_id ); $r = wp_parse_args( $args, $defaults ); extract( $r, EXTR_SKIP ); switch($field) { case 'About': $len = 200; break; default: $len =20; break; } echo substr( $data, 0, $len); $words = array_slice( explode( ' ', $data), 0, $len ); echo implode( ' ', $words ); }
Let me know if it works 🙂
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 🙂
April 1, 2016 at 13:43 #114056LauraModeratorHello, as you can see in the code, for About field, 200, and for default fields, 20 🙂
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 🙂
-
AuthorPosts
You must be logged in to reply to this topic.