Skip to:

Please give option to remove "read more" or adjust excerpt length

  • bitpath


    I don’t know if it’s just certain themes, but it seems crazy if you need a specific theme to allow buddypress “read more” link to work right.
    I’m not sure this is true, but it’s the gist I think I’ve gotten. It doesn’t work with some themes, or at least not mine. It goes into this crazy loop popping up and down on its own once it’s clicked on.
    Can we just get rid of it completely in settings somewhere or in add something to functions.php to allow longer posts or get rid of this unpredictable read more ajax link?
    I apologize if this has been resolved or this is the wrong place. I found a couple posts but they did not seem resolved for this general purpose and seemed focused on specific themes.
    thank you!

Viewing 5 replies - 1 through 5 (of 5 total)
  • I don’t know if it’s just certain themes, but

    Not that clear what this issue is but you establish whether it’s a true BP issue by switching to a theme BP is expected to work with, by that we tend to mean any of the default themes WP ships with. If issue not present running, say, twentyfourteen then it’s a theme related problem.



    OK, but is there a way to just get rid of the “read more” behavior anyway? I would like to please control the length of the excerpt, and make it long enough where it is a non-issue regardless of theme. The posting and other parts of buddypress are working great with the theme I have chosen, and other than this I don’t seem to have any “theme issues” yet. I’ve found the less ajax I have on pages the less conflicts I get with different themes and plugins anyway and would rather increase the size and test getting rid of excerpt cutoffs altogether due to potential conflicts and funky interaction with other ajax components. For this implementation, I think it would be much better to limit the size of posts when people make them, and not attempt to truncate them in the activity stream at all, to avoid other possible ajax interactions with something like lightbox or different themes. I’m not sure the ideal size to allow yet though. I would also like to look at limiting the size of posts but am hoping that’s easier after changing the “…” [read more] behavior. I am comfortable editing code if I have to, I’m just not sure where to yet.

    These are the posts I’ve found of people trying to get rid of the “…” and [read more], or change the excerpt size and wording, but they’re old. There may be partial solutions in these threads but I’m afraid I don’t understand how to pull it all together or if they resolved it.

    thank you.

    Similar issue but didn’t see resolved, just replies stopped-





    Thank you so much for your help. I noticed this only affects new posts, which is still awesome, and I did see that the 2014 theme did allow for the read-more to work on older posts (but it had width display issues with a different plugin I am using, so I switched back).
    Both suggestions and tools helped greatly understanding this and fixing it. Thank you again!

    It may work better to manage a larger chunk of the activity truncation so you have control of things like excerpt length, appended text, removed create excerpt elipses, and ability to remove the class that Ajax hooks to while still allowing appended link to function for single activity. It’s a little dirty but…:

    function custom_activity_excerpt_read_more( $excerpt, $text, $append_text ) {
    // Manage the excerpt length
    $excerpt_length = 100;
    // Manage the appended string for truncated excerpts so we have a link to single activity
    $append_text = '…';
    // Manage the initial text run through the bp create excerpt filter  to remove 'ending'
    $excerpt = bp_create_excerpt( $text, $excerpt_length, array( 'ending' => __( '', 'buddypress' ) ) );
    // Manage the excerpt  appended displayed markup & rename the span class 'activity-read-more' to disable Ajax hook
    $excerpt = sprintf( '%1$s<span class="custom-activity-read-more" id="%2$s"><a href="%3$s" rel="nofollow">%4$s</a></span>', $excerpt, $id, bp_get_activity_thread_permalink(), $append_text );
    return $excerpt;
    add_filter('bp_activity_truncate_entry', 'custom_activity_excerpt_read_more', 10, 3);
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Please give option to remove "read more" or adjust excerpt length’ is closed to new replies.
Skip to toolbar