bp_get_member_latest_update – How to Remove the extra characters “” and –
-
I found this article that showed how to remove the “” quotation marks that surrounded the text.
https://buddypress.org/support/topic/does-bp_member_latest_update-take-arguments/
I wanted to remove both the quotation marks “” and the dash -.
members-loop.php
I replaced
<?php bp_member_latest_update(); ?>
with the following.
<?php $latestupd = html_entity_decode(bp_get_member_latest_update('length=24')); $latestud = str_replace(str_split('-"'), ' ', $latestupd); echo $latestud; ?>
This limits the text output printed to 24 characters and removes the starting dash and the surrounding quotation marks.
On my Members page instead of users activity showing:
– “This is my last post.”
It now shows.
This is my last post.
- You must be logged in to reply to this topic.