BuddyDev

Search

[Resolved] BP-activity-shortcode: what option value would be blog-titles?

  • Participant
    Level: Initiated
    Posts: 2
    Ernesto Spruyt on #1783

    I am experimenting with filters on my activity stream. I am trying to filter such that it only displays blog-titles. I have used this:

    [activity-stream title=”Posts” object=blogs per_page=25]

    but it displays next to the title also the entire body of the blogs. what shortcode should i use if i only want to display blog-titles? i can’t seem to find the right option value for blog-titles

    thanks in advance for your help.

  • Participant
    Level: Initiated
    Posts: 2
    Ernesto Spruyt on #1784

    what also would be useful is to know the shortcode (if it exists) for a maximum amount of chars to display on the blogs

  • Keymaster
    (BuddyDev Team)
    Posts: 24623
    Brajesh Singh on #1785

    Hi Ernesto,
    Welcome to BuddyDev forums.

    You are doing it correctly. Using “blogs” object will list all blog activity. This plugin does not control the content. It simply delegates the task to BuddyPress for listing the items based on your options.

    For newer blog posts( After BuddyPress 2.3 ), They do not record the whole blog post, so only a part should be listed. For older blog posts, BuddyPress does have issues with longer posts. That’s why you are seeing this.

    Though I understand the need for listing title, that will be much beyond the scope of this plugin. The only solution as I see is using css to hide the content and let the title be there.

    If you want to go through that way, please do let me know. I will assist with css.

  • Participant
    Level: Enlightened
    Posts: 134
    HansRuedi Keller on #1787

    For older blog posts I had to add this line in bp-custom.php …

    add_filter( 'bp_activity_maybe_truncate_entry', '__return_true' );

    …to get an excerpt in activity.

  • Participant
    Level: Initiated
    Posts: 2
    Ernesto Spruyt on #1808

    thanks for your answers. I have hidden the body through the css. Works like a charm.

  • Keymaster
    (BuddyDev Team)
    Posts: 24623
    Brajesh Singh on #1811

    Thank you Hans and Ernesto.
    Glad it is fixed 🙂

The topic ‘ [Resolved] BP-activity-shortcode: what option value would be blog-titles?’ is closed to new replies.

This topic is: resolved