This topic has 8 replies, 4 voices, and was last updated 11 years by hughm.

  • Author
  • #3966
     Tenshi
    Participant

    Greetings~

    How does one increase the text limit for the group excerpt on the group listing? I tried searching online but they either break the design or don’t add the […] at the end. Thank you!

    http://puu.sh/4KlN6.png

    #4007
     SQadmin
    Keymaster

    Hi,
    This code added to sweetdate-child/functions.php modifies the length of the excerpt:

    COPY CODE
    
    // group custom excerpt
    add_filter( 'bp_excerpt_length', 'kleo_my_custom_group_excerpt');
    function kleo_my_custom_group_excerpt($length)
    {
    	return 225;
    }
    

    Modify the 225 length to whatever you want

    Also you need to add this css to Sweetdate – Styling options – Quick css to disable the limited height:

    COPY CODE
    
    #groups-list .search-body {height:auto;}
    
    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #4057
     Tenshi
    Participant

    Thank you!!!

    #6274
     hughm
    Participant

    I am trying to add length to the group excerpts on the Group Directory page. I tried the above code in my sweetdate-child/functions.php file and it did not work. Is this code still valid?

    I am also modifying the group-loop.php file in my sweetdate-child/groups folder. Can I set the excerpt length here (around line 37)?

    <div class=”item-desc”><?php bp_group_description_excerpt(); ?></div>

    #6348
     SQadmin
    Keymaster

    Adding that code should do it. Make sure you have the child theme activated

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #6552
     hughm
    Participant

    I’ve tried the above code and it isn’t working for me. In Firebug it looks like the function adds space to the div class=”item-desc” but I can’t make the excerpt appear with more than 2 lines. I can reduce it down to nothing with your code but cannot add to the excerpt.
    Here is the site if you want to take a look: http://www.uberon.net/groups

    Is it possible to edit the groups-loop.php to adjust the excerpt length?

    <div class=”item-desc”><?php bp_group_description_excerpt(); ?></div>

    #6553
     adam
    Participant

    same here. code didn’t work for me either 🙁

    #6607
     SQadmin
    Keymaster

    Hi, I have added above a css rule that disables the height limit: https://archived.seventhqueen.com/forums/topic/increase-group-excerpt-limit#reply-4007

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #6642
     hughm
    Participant

    Great. Thanks for that. Works great.

Viewing 9 posts - 1 through 9 (of 9 total)

The forum ‘Sweetdate – WordPress’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?