BuddyDev

Search

BP Activity links abbrevation issue

  • Participant
    Level: Master
    Posts: 496
    Daniel on #47397

    Yo hi,

    I have detected a problem on my website on BP activity, when the users post their text and their links, then there is a Read More function, so when a link is posted on activity, it shows at the end an abbrevation &hellip. So when clicking on that link then the redirection is resulting in 404 page not found obviously. Only when clicking the Read More button, then the whole link is visible.

    Do you think there is a possibility to force Buddypress to show always the whole links on activity without clicking Read More button?

    Thank you for your input.

    Regards
    Daniel

  • Participant
    Level: Master
    Posts: 496
    Daniel on #47398
    This reply has been marked as private.
  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 2933
    Ravi on #47401

    Hello Daniel,

    Thank you for posting. The link is broken because BuddyPress shows an excerpted view of activity content means BuddyPress truncates activity content by 358 characters by default. You can disable this using the following code:

    
    add_filter( 'bp_activity_maybe_truncate_entry', '__return_false' );
    
    

    Please give it a try and let me know.

    Regards
    Ravi

  • Participant
    Level: Master
    Posts: 496
    Daniel on #47410

    Hi Ravi,

    Thanks for the code. Before I test it I have two little questions:

    1. do I need to add the code to the bp-custom.php file?
    2. Does when applying the code the “Read More” link disappear and the whole post is showing even when it is a large post or will there still be the “Read More” button to maximise the post?

    Thanks for your short feedback.

    Regards
    Daniel

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 2933
    Ravi on #47411

    Hello Daniel,

    1. do I need to add the code to the bp-custom.php file?
    Either you can place this code in your ‘bp-custom.php’ file or in your active theme ‘functions.php’ file.
    2. Does when applying the code the “Read More” link disappear and the whole post will show?
    Yes, Above mention code make this button disappear. Even in large content case, No Read More link will appear.

    Please check.

    Regards
    Ravi

You must be logged in to reply to this topic.

This topic is: not resolved