Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'theme'

Viewing 25 results - 201 through 225 (of 31,071 total)
  • Author
    Search Results
  • #333966
    stephunique
    Participant

    BuddyX is the free theme that was specifically developed for BuddyPress.

    To install this, log in to your WordPress dashboard, go to Appearance – Themes – Add new – use the search bar to look for “BuddyX”, then install, and activate.

    #333956
    chbing5828
    Blocked

    Implementing favorites for custom post types using BuddyPress and REST API involves a few strategic steps. Here, I’ll outline a method to integrate this functionality effectively:

    ### Step 1: Ensure BuddyPress REST API Is Enabled

    Firstly, ensure that the REST API support is active in BuddyPress. BuddyPress provides REST endpoints for various components, but you may need to confirm that it’s set up to interact with your custom post types.

    ### Step 2: Register Custom Post Type for BuddyPress Activity Tracking

    You mentioned you’ve seen documentation related to registering custom post types for tracking activity. This is crucial as BuddyPress needs to be aware of these custom post types to interact with them effectively. You can do this by adding a function to your theme’s functions.php file or a site-specific plugin:

    `php
    function register_custom_post_type_activity_tracking() {
    bp_set_post_types( array(
    ‘drop’ => array(
    ‘track_activity’ => true
    )
    ) );
    }
    add_action( ‘bp_init’, ‘register_custom_post_type_activity_tracking’ );
    `
    This code snippet informs BuddyPress to track activities (like posts and updates) for the “drop” custom post type.

    ### Step 3: Create a REST Endpoint for Favorite Action

    You will need to create a custom REST API endpoint to handle the favorite action. This endpoint will be responsible for adding and removing favorites.

    `php
    add_action( ‘rest_api_init’, function () {
    register_rest_route( ‘buddypress/v1’, ‘/favorite/’, array(
    ‘methods’ => ‘POST’,
    ‘callback’ => ‘handle_favorite’,
    ‘permission_callback’ => function () {
    return is_user_logged_in(); // Ensure the user is logged in
    }
    ));
    });

    function handle_favorite( WP_REST_Request $request ) {
    $user_id = get_current_user_id();
    $post_id = $request[‘post_id’];
    $action = $request[‘action’]; // ‘add’ or ‘remove’

    if ($action === ‘add’) {
    // Logic to add a favorite
    bp_activity_add_user_favorite( $post_id, $user_id );
    } else if($action === ‘remove’) {
    // Logic to remove a favorite
    bp_activity_remove_user_favorite( $post_id, $user_id );
    }

    return new WP_REST_Response( array(‘success’ => true), 200 );
    }
    `

    ### Step 4: Interact with the REST API

    You can now interact with this API using JavaScript or any other client that can make HTTP requests. Here’s an example of how you might call this API using JavaScript Fetch API:

    `javascript
    function toggleFavorite(postId, action) {
    fetch(‘/wp-json/buddypress/v1/favorite/’, {
    method: ‘POST’,
    headers: {
    ‘Content-Type’: ‘application/json’,
    ‘Authorization’: ‘Bearer YOUR_ACCESS_TOKEN’ // You should implement authorization
    },
    body: JSON.stringify({ post_id: postId, action: action })
    })
    .then(response => response.json())
    .then(data => console.log(data))
    .catch(error => console.error(‘Error:’, error));
    }

    // Usage
    toggleFavorite(123, ‘add’); // Add a favorite
    toggleFavorite(123, ‘remove’); // Remove a favorite
    `

    ### Step 5: Test and Refine

    After implementing, conduct thorough testing to ensure that your favorites system works as expected. Check both the functionality and security aspects, especially focusing on permissions and data validation.

    By following these steps, you should be able to add a favorites feature to your custom post types leveraging BuddyPress and the WordPress REST API effectively. beach buggy racing cheats apk

    shiylo
    Participant

    Salut ! Effectivement, BuddyPress ne supprime pas automatiquement les avatars des utilisateurs lorsque leurs comptes sont supprimés. Cependant, tu peux gérer ce problème en ajoutant un peu de code personnalisé à ton thème ou dans un plugin spécifique. Voici comment tu pourrais procéder pour supprimer les avatars lors de la suppression des comptes d’utilisateurs :

    1- Crée un hook dans ton fichier functions.php ou dans un plugin spécifique :
    Utilise l’action bp_remove_user ou wpmu_delete_user, delete_user selon la configuration de ton réseau si tu es en multisite ou pas.
    2- Ajoute le code suivant pour supprimer l’avatar lorsqu’un utilisateur est supprimé :

    function remove_user_avatar_on_delete($user_id) {
        // Vérifie si l'utilisateur a un avatar
        $avatar_path = bp_core_fetch_avatar(array(
            'item_id' => $user_id,
            'html'    => false,
            'type'    => 'full',
            'no_grav' => true
        ));
    
        if ($avatar_path) {
            // Supprime le fichier avatar
            @unlink($avatar_path);
        }
    }
    
    // Hook pour la suppression de l'utilisateur
    add_action('delete_user', 'remove_user_avatar_on_delete');
    add_action('wpmu_delete_user', 'remove_user_avatar_on_delete');
    add_action('bp_remove_user', 'remove_user_avatar_on_delete');
    

    Note : Ce code utilise @unlink pour supprimer le fichier, qui supprime silencieusement le fichier sans afficher d’erreur si le fichier n’existe pas ou ne peut être supprimé. Assure-toi que le chemin de l’avatar est correctement récupéré.

    3- Teste le code : Avant de mettre ce code en production, teste-le dans un environnement de développement pour t’assurer qu’il fonctionne comme attendu sans effets secondaires.
    Cela devrait aider à gérer le problème des fichiers d’avatar résiduels. Si tu as besoin de plus d’informations sur la fonction ou sur d’autres façons de gérer les fichiers avec WordPress et BuddyPress, n’hésite pas à demander !

    michaeldenmark
    Participant

    I have inserted this code in bp-custom.php:

    <?php
    function my_redirect() {
    wp_redirect( home_url() );
    error_log(‘Hello log’);
    exit;
    }
    add_action( ‘bp_groups_posted_update’, ‘my_redirect’ );
    ?>

    Writing is done to the log file, but there is no redirect after a user has posted an update in “Group Activities”. Why not?

    As a test, if I use “wp_redirect( ‘https://buddypress.org/&#8217; );” instead of “wp_redirect( home_url() );” and use the action hook “init” instead of “bp_groups_posted_update”, and press F5, I am redirected to https://buddypress.org/.

    I use the latest version of WordPress and BuddyPress.

    BuddyPress is the only plugin activated.

    WordPress is installed in a subdomain.

    My issue still happens with themes Twenty Twenty-One, Twenty Twenty-Two, Twenty Twenty-Three and Twenty Twenty-Four.

    #333933
    planetearthlings
    Participant

    Hi Again @poojasahgal…ends up there was a bug in the theme coding which the theme developer has fixed. Now there is no “Manage Groups” link in the menu for those who aren’t admins. Thanks for trying to help. Really appreciate you taking the time. Best wishes.

    thinlizzie
    Participant

    Stephunique,

    You can usually access functions.php via the WordPress admin area.

    WP Admin -> Appearance -> Theme File Editor

    If you can not see it there, then contact your Theme provider for support.

    Again, I recommend you use the Code Snippets plugin. It will add almost no overhead to your sites speed.

    epgb101
    Participant

    Since updating to 12.4.1 the /members/ and /groups/ pages show profiles and groups layout rather messed up. Not complaining – looking at 12.4.1 updates notes that say the update is related to widget security makes me think it’s something to do with that as these are widget-like sections that broke. I’m using GWANGI theme.
    I wondered if anyone had the same issue and a simple WP/BP fix or suggestions I can do in /wp-admin/ or code. Meanwhile I will contact the theme maker to see if it’s their end.
    Thanks.

    thinlizzie
    Participant

    Stephunique,

    – I would recommend you use a plugin to add PHP code to your site. It’s very easy and safe.
    Search for the free “Code Snippets” plugin by Code Snippets Pro.

    – However, if you prefer to add the code direct to your theme, it should be added near the end of the functions.php file.

    #333870
    tonygao
    Participant

    Already input the username but the form field name is “send_to_input” but the backend PHP still use old form field name “send_to_usernames”. That’s the bug!

    The bug happened in classic theme.

    #333865

    In reply to: Issues with Sidebars

    jettie4521
    Participant

    check if your theme offers different page templates for BuddyPress pages, allowing customization of layouts and sidebar settings. If available, utilize these templates accordingly. Alternatively, explore the use of custom CSS to hide the sidebar on specific pages where it’s not desired, while ensuring it remains visible on profile and group detail pages

    #333862

    In reply to: Issues with Sidebars

    werny
    Participant

    Gwangi Theme

    #333859

    In reply to: Issues with Sidebars

    Pooja Sahgal
    Participant

    Which theme are you using?

    #333855
    werny
    Participant

    Theme suppport wants me to pay for custom programming for it.
    That is crazy beacuse this should be working on every page without problems.

    #333841
    planetearthlings
    Participant

    I have tried to find a solution both searching the web and using ChatGPT, but haven’t solved it. ChatGPT suggest adding the code below to the function.php file for the Theme replacing the “manage-group-slug” for the slug for the Manage Groups menu item. I’ve tried several options for that, but nothing has worked.

    function remove_manage_groups_menu() { if (!current_user_can(‘administrator’)) { // Use the menu slug of the ‘Manage Groups’ page remove_menu_page(‘manage-groups-slug’); } } add_action(‘admin_menu’, ‘remove_manage_groups_menu’);

    Any idea how I can find the correct slug?

    #333834
    Pooja Sahgal
    Participant

    Hope your issue is solved yet, but if not please read further.
    It seems like a third-party plugin or theme conflict issue, so to narrow things down, deactivate all plugins nonessential to BP functioning and then re-activate them one by one until the issue reappears.
    Please make sure to take a proper backup prior. However, the best practice is to debug this on your staging site.

    #333829

    In reply to: Member Blog issue

    angelinajaade
    Participant

    The ‘add new post’ page is selected in plugin settings, there is no other equevalent and it does not load the blog writing into the theme.

    I contacted their support, awaiting answer.

    #333811

    In reply to: Member Blog issue

    planetearthlings
    Participant

    What theme are you using? That could be the problem.

    #333809
    planetearthlings
    Participant

    Hi All, I’m using the Vikinger theme to create a social network experience for the Educational Virtual World we are creating. I have WordPress 6.5.2, BuddyPress 12.4.0 and the website is: https://www.zarbul.com.

    I have disabled the “Allow registered members to upload avatars” but “Change Avatar” is still available on the Profile Info page.

    What I really want is a way to make it so members can choose from a number of avatars we have created. One search suggests that is possible, but the “Allow registered members to upload avatars” has to be off.

    #333802
    angelinajaade
    Participant

    I apologize if this has already been answered. I searched through the topics but did not find any match.

    I have issues with the BuddyPress Member Blog plugin.

    — When clicking “Add new post” and also “Read more” as it leads to a regular WordPress post page instead of loading into BuddyPress/the theme (?).

    It does not integrate, like the list of posts does.

    Example page for reference: https://bygrace.faith/members/angelinajaade/posts/

    Help appreciated.

    #333792
    planetearthlings
    Participant

    Hi All, I’m using the Vikinger theme to create a social network experience for the Educational Virtual World we are creating. I have WordPress 6.5.2, BuddyPress 12.4.0 and the website is: https://www.zarbul.com.

    While creating Groups with the “Enable forum for this group” checked I received an error message saying one of the group images wasn’t the right size even though it was the same as all the others I created. On the third time it was accepted, but when I went to the Group Forums I’m saw the forum for that group listed THREE times. When I went back and unchecked the “Enable forum for this group” it removed one of the listing, but there are still two more…and when I click on them I get a 404 error.

    How do I get rid of the those Group Forum listings which aren’t connected to any groups?

    #333772
    planetearthlings
    Participant

    Hi All, I’m using the Vikinger theme to create a social network experience for the Educational Virtual World we are creating. I have WordPress 6.5.2, BuddyPress 12.4.0 and the website is: https://www.zarbul.com.

    When I have a user account set to Administrator clicking on the Groups menu item goes to http://www.zarbul.com/groups, but if the account is set to anything other than Administrator clicking the Groups menu just goes back to the HomePage.

    Not sure if I just have it setup wrong, there is a conflict with some other Plugin or ???

    Thanks in advance for any help. I spent hours yesterday doing research and testing a variety of solutions, but nothing seems to be working.

    johndawson155
    Participant

    Wordpress Version: 6.5.2
    BuddyPress Version: 12.4.0
    Theme: 2014
    Other Plugins: Membership Pro

    Relevant info: we have a snippet that uses the following functions, to get Group Info.

    groups_get_groups()
    groups_get_user_groups()
    bp_get_user_group_role_title()
    get_group_role_label()
    bp_get_group_type_post_id()

    Getting the error below; something needs an update …
    Perhaps one or more of the above functions are causing this?

    Deprecated: Function bp_get_groups_directory_permalink is deprecated since version 12.0.0! Use bp_get_groups_directory_url() instead. in /var/www/html/wp-includes/functions.php on line 6078 Warning: Cannot modify header information – headers already sent by (output started at /var/www/html/wp-includes/functions.php:6078) in /var/www/html/wp-admin/includes/misc.php on line 1439 Warning: Cannot modify header information – headers already sent by (output started at /var/www/html/wp-includes/functions.php:6078) in /var/www/html/wp-includes/functions.php on line 7096 Warning: Cannot modify header information – headers already sent by (output started at /var/www/html/wp-includes/functions.php:6078) in /var/www/html/wp-admin/admin-header.php on line 9

    #333737
    locker17
    Participant

    Hi,
    I have a quite fresh buddypress installation. Today I wanted to register some users for testing purposes. But it doesn’t work. It reloads the page without any message after pressing register-button.
    I found out that it has to do with a checkbox for privacy (I have read and agree to this site’s Privacy Policy…). Even agreed no registering possible.
    When I switch to the legacy template the checkbox is gone and the registering works as expected but not with the Noveau template.
    On line 2580 of bp-nouveau\includes\template-tags.php the policy accepatance is set:

    <div class="privacy-policy-accept">
    		<?php if ( $error ) : ?>
    			<?php nouveau_error_template( $error ); ?>
    		<?php endif; ?>
    
    		<label for="signup-privacy-policy-accept">
    			<input type="hidden" name="signup-privacy-policy-check" value="1" />
    
    			<?php /* translators: link to Privacy Policy */ ?>
    			<input type="checkbox" name="signup-privacy-policy-accept" id="signup-privacy-policy-accept" required /> <?php printf( esc_html__( 'I have read and agree to this site\'s %s.', 'buddypress' ), sprintf( '<a href="%s">%s</a>', esc_url( get_privacy_policy_url() ), esc_html__( 'Privacy Policy', 'buddypress' ) ) ); ?>
    		</label>
    	</div>

    How can I fix this?

    Only buddypress plugin is installed, theme twenty tweny four.

    #333728
    Pooja Sahgal
    Participant

    Hope your issue is solved yet but if not please read further.
    It seems like a third-party plugin or theme conflict issue, so to narrow things down, deactivate all plugins nonessential to BP functioning and then re-activate them one by one until the issue reappears.
    Please make sure to take a proper backup prior.
    In case of a theme, please activate a theme that is known to behave correctly with BuddyPress, that will be any theme that is in the default install from WP, so choose either ‘Twenty Twenty-two’, ‘Twenty Twenty-three’, or a later one. Having activated one of these themes, check again if you still have the same issue, if you haven’t then this tells us it’s theme-related, and in the first instance, you should contact the theme author for help.

    #333651
    yo2.mike
    Participant

    And to add to this question, I’ve discovered that whenever using a child theme this problem persists. But if I switch to a parent theme, all the notifications and messages do work. But this is a problem because I would like to use a child theme so I can make my changes etc.

Viewing 25 results - 201 through 225 (of 31,071 total)
Skip to toolbar