Skip to:
Content
Pages
Categories
Search
Top
Bottom

[Resolved] Group types not showing up at group creation


  • rda5009
    Participant

    @rda5009

    Wordpress version: 4.6.1
    BP version: 2.7
    First off, hats off to the folks who put together this 2.7 update- glad to see the direction BP has been going over the years. I was really excited to see the addition of group types too. However, I can’t seem to get the basics to work with it. I am trying to get Group Types to show up at the group creation time on the front-end, but it still does not appear. In order to test it out, I tried just using the code exactly as it appeared on the codex:

    function my_bp_custom_group_types() {
        bp_groups_register_group_type( 'team', array(
            'labels' => array(
                'name' => 'Teams',
                'singular_name' => 'Team'
            ),
     
            // New parameters as of BP 2.7.
            'has_directory' => 'teams',
            'show_in_create_screen' => true,
            'show_in_list' => true,
            'description' => 'Teams are good',
            'create_screen_checked' => true
        ) );
    }
    add_action( 'bp_groups_register_group_types', 'my_bp_custom_group_types' );
    

    I dropped the code into my child theme’s function.php but the options do not show up like they do on the screenshots. I tried clearing the cache too but to no avail.

    By the way, I referenced the Group Types codex page for all the actions above. Any help would be greatly appreciated.

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

  • danbp
    Moderator

    @danbp

    Add the code to bp-custom.php

    bp-custom.php

    Read also here, might help for test

    Group Types option display


    valuser
    Participant

    @valuser

    @rda5009 this also happened to me –

    but, for me, it was was theme related

    It did not occur with the Twenty Sixteen Theme where group types did appear when that function as per codex page was inserted in functions.php

    The particular theme, kleo, was updated today, to v.4.1.6, and now has no problems with group types


    @danbp
    thanks so much for tutorial AWESOME! and for your contributions over the years –


    rda5009
    Participant

    @rda5009

    Thank you both for your reply. I tried putting it in bp-custom.php but had no luck. Then I tried switching themes and it looks like the Thrive theme isn’t working with it either. So now I’ve going to try to get that straightened out…


    Hugo Ashmore
    Keymaster

    @hnla

    It sounds like a template issue, there do need to be template revisions, additional template function tags to make this process work as detailed in the codex page here:

    Template Updates 2.7

    Custom themes may well not have updated their templates.

    Registering the new types can be done in theme functions files but then are locked to that theme or site.


    rda5009
    Participant

    @rda5009

    Thanks for the reply, Hugo.

    Thankfully I still had support from my theme so they were able to help me out with this. However, I did notice that descriptions have this- �, a question mark inside a black diamond in front of them. I assume that this is supposed to be a space or a hyphen, but am not sure where to change. I made sure the bp-custom.php was set to UTF-8 but this did not solve my problem.

    Any suggestions?


    rda5009
    Participant

    @rda5009

    Nevermind just solved it. The theme files I just updated were not set to UTF-8.

    Thanks everyone!

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