Skip to:
Content
Pages
Categories
Search
Top
Bottom

deqeue bp, bbp css and get group member count.


  • freeace00
    Participant

    @freeace00

    Hello,

    I have been quite happy with customizing buddypress, bbpress.

    I have found 2 issues you need to know.

    1. I am using less file and removed original css files.

    /** Remove original bp css **/
    function dequeue_buddypress() {
    		wp_dequeue_style('bp-legacy-css');
    		wp_dequeue_style('bbp-default');
    }
    add_action('wp_enqueue_scripts', 'dequeue_buddypress');
    

    However, I found that it also doesn’t get “cover image in single members, single groups”.
    I have added it in a theme. I added all original css code into less file and have been working on customization.

    Is there any better way to remove original css and use my own less (css) file without losin cover image?
    Is there anything more I lose if I remove the original css files?

    2. How can I get group member amount only NUMBERS.
    bp_group_member_count()

    It gets with xx “members”. But I just need numbers of the group. I use it in groups-loop.php

    Thank you,

Viewing 2 replies - 1 through 2 (of 2 total)

  • freeace00
    Participant

    @freeace00

    I have found that “bp-legacy-css-inline-css” code is not loaded.
    It’s including cover image and some.
    It’s originally after buddypress.min.css.

    
    <style id="bp-legacy-css-inline-css">
    /* Cover image */
    		#buddypress #header-cover-image {
    			height: 400px;
    			background-image: url(....);
    		}
    
    		#buddypress #create-group-form #header-cover-image {
    			margin: 1em 0;
    			position: relative;
    		}
    
    </style>
    

    something like this.
    This has been removed as well when I removed original css code.

    I also created a folder (/wp-content/themes/my-theme/buddypress/css/buddypress.css).
    It doesn’t load the original one and works fine. But it’s not loading “bp-legacy-css-inline-css”.
    That’s why cover images are not showing.

    Is there any solution or am I missing something?


    freeace00
    Participant

    @freeace00

    I am leaving the answer I found the solution for next person who has the same issue. https://codex.buddypress.org/themes/buddypress-cover-images/#about-buddypress-css-overrides

    Solved!

    Thank you all,

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