Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

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

  • pandreas
    Participant

    @pandreas

    Can you be more specific? Which plugin you used?

    Thank you


    pandreas
    Participant

    @pandreas

    Yes, there is a plugin for this work: https://buddydev.com/plugins/bp-xprofile-member-type-field/


    pandreas
    Participant

    @pandreas

    Thank you for your suggestion. I didn’t know about this plugin!


    pandreas
    Participant

    @pandreas

    I would also like to have some help to this topic.

    I have the same problem. Two languages on my site using polylang! How can these buddypress pages be translated and work to the second language as well?

    Thank you in advance!


    pandreas
    Participant

    @pandreas

    Ok thank you!


    pandreas
    Participant

    @pandreas

    Thank you, I don’t have to include hidden groups indeed!

    One more question: What about bp_get_total_group_count_for_user?

    How I can override this in order to exclude some groups from the count?

    Andreas


    pandreas
    Participant

    @pandreas

    Thank you for your answers and recommendations!

    The custom function that I have written before, I suppose it does what I want very well. Am I right?

    Here it is again.

    function filter_bp_get_total_group_count()
    {
    global $wpdb;
    $hidden_sql = "WHERE slug not in ('health', 'social', 'cultury')";
    $bp = buddypress();
    return $wpdb->get_var( "SELECT COUNT(id) FROM {$bp->groups->table_name} {$hidden_sql}" );
    };

    pandreas
    Participant

    @pandreas

    I have done the same thing, if you read my post.

    The question is about the function ‘my_group_count_filter’.

    Do I have to use a simple and direct query to database like this one that my function has?

    return $wpdb->get_var( "SELECT COUNT(id) FROM {$bp->groups->table_name} {$hidden_sql}"

    Or is there any other way to pass excluded groups to my counter?

    Thank you!

    Andreas


    pandreas
    Participant

    @pandreas

    Yes, but how I will use wp_update_term function?

    I have written this:

    function example_update_category( $group_id ) {

    $group = groups_get_group( array( ‘group_id’ => $group_id ) );
    $name = $group->name;
    $groupid = $group->id;

    wp_update_term(
    189, //for a specific category item
    ‘category’,
    array(
    ‘name’ => $name
    )
    );
    }
    add_action( ‘groups_details_updated ‘, ‘example_update_category’, 1, 1 );

    But it doesn’t seem to work. What is wrong? Hook maybe?

    Thank you in advance!

    Andreas


    pandreas
    Participant

    @pandreas

    Is there any answer to this? How we will tell buddypres to change category name when a group name is edited?

    Thank you much!

    Regards,

    Andreas


    pandreas
    Participant

    @pandreas

    This works great! Thank you very much for your support.

    When I choose to edit group and change, for example, the group name, of course category name doesn’t change. How can we do that?

    Thank you in advance!

    Regards,

    Andreas


    pandreas
    Participant

    @pandreas

    Did you find any solution with this?

    I also have similar problem and want to use a category for each group creation..

    Regards,

    Andreas


    pandreas
    Participant

    @pandreas

    @Alvin341965, Could you please tell me which theme you are using?

    Thank you!

    Andreas

Viewing 13 replies - 1 through 13 (of 13 total)
Skip to toolbar