Skip to:
Content
Pages
Categories
Search
Top
Bottom

bp_get_member_latest_update – How to Remove the extra characters “” and –


  • jcfromkc
    Participant

    @jcfromkc

    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.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.
Skip to toolbar