Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'theme'

Viewing 25 results - 151 through 175 (of 31,071 total)
  • Author
    Search Results
  • #334963
    George
    Participant

    For anyone that landed here from a Google search. The pagination is not working for forums set up inside BuddyPress groups. You need to copy those two files from
    \plugins\bbpress\templates\default\bbpress
    pagination-topics.php
    pagination-replies.php

    and copy them to
    \wp-content\themes\[yourchildtheme]\bbpress

    Replace the code inside pagination-topics.php to:

    <?php
    
    /**
     * Pagination for pages of topics (when viewing a forum)
     *
     * @package bbPress
     * @subpackage Theme
     */
    
    // Exit if accessed directly
    defined( 'ABSPATH' ) || exit;
    
    do_action( 'bbp_template_before_pagination_loop' );
    
    // Use bbPress setting for topics per page
    $posts_per_page = bbp_get_topics_per_page();  // Dynamically get the value from bbPress settings
    
    // Get the current page
    $paged = (get_query_var('paged')) ? absint(get_query_var('paged')) : 1;
    
    // Set up the custom query
    $args = array(
        'post_type'      => bbp_get_topic_post_type(),
        'posts_per_page' => $posts_per_page,
        'paged'          => $paged,
        'meta_query'     => array(
            array(
                'key'   => '_bbp_forum_id',
                'value' => bbp_get_forum_id(),
            ),
        ),
    );
    
    // Run the custom query
    $forum_query = new WP_Query($args);
    
    if ($forum_query->have_posts()) :
    ?>
        <div class="bbp-pagination">
            <div class="bbp-pagination-count">
                <?php
                // Display the range of topics being viewed
                $start = ($paged - 1) * $posts_per_page + 1;
                $end = min($paged * $posts_per_page, $forum_query->found_posts);
                echo sprintf(__('Viewing %1$s to %2$s (of %3$s topics)'), $start, $end, $forum_query->found_posts);
                ?>
            </div>
            <div class="bbp-pagination-links">
                <?php
                // Generate the pagination links
                echo paginate_links(array(
                    'total'   => $forum_query->max_num_pages,
                    'current' => $paged,
                    'format'  => '?paged=%#%',
                    'add_args' => false,
                    'prev_text' => __('« Prev'),
                    'next_text' => __('Next »'),
                ));
                ?>
            </div>
        </div>
    <?php
    else :
        echo '<p>No topics found.</p>';
    endif;
    
    // Reset post data
    wp_reset_postdata();
    
    do_action('bbp_template_after_pagination_loop');
    ?>
    

    Replace the code inside pagination-replies.php to:

    <?php
    
    /**
     * Pagination for pages of replies (when viewing a topic)
     *
     * @package bbPress
     * @subpackage Theme
     */
    
    // Exit if accessed directly
    defined( 'ABSPATH' ) || exit;
    
    do_action( 'bbp_template_before_pagination_loop' );
    
    // Use bbPress setting for replies per page
    $posts_per_page = bbp_get_replies_per_page();  // Dynamically get the value from bbPress settings
    
    // Get the current page
    $paged = (get_query_var('paged')) ? absint(get_query_var('paged')) : 1;
    
    // Set up the custom query
    $args = array(
        'post_type'      => bbp_get_reply_post_type(),
        'posts_per_page' => $posts_per_page,
        'paged'          => $paged,
        'meta_query'     => array(
            array(
                'key'   => '_bbp_topic_id',
                'value' => bbp_get_topic_id(),
            ),
        ),
    );
    
    // Run the custom query
    $replies_query = new WP_Query($args);
    
    if ($replies_query->have_posts()) :
    ?>
        <div class="bbp-pagination">
            <div class="bbp-pagination-count">
                <?php
                // Display the range of replies being viewed
                $start = ($paged - 1) * $posts_per_page + 1;
                $end = min($paged * $posts_per_page, $replies_query->found_posts);
                echo sprintf(__('Viewing %1$s to %2$s (of %3$s replies)'), $start, $end, $replies_query->found_posts);
                ?>
            </div>
            <div class="bbp-pagination-links">
                <?php
                // Generate the pagination links
                echo paginate_links(array(
                    'total'   => $replies_query->max_num_pages,
                    'current' => $paged,
                    'format'  => '?paged=%#%',
                    'add_args' => false,
                    'prev_text' => __('« Prev'),
                    'next_text' => __('Next »'),
                ));
                ?>
            </div>
        </div>
    <?php
    else :
        echo '<p>No replies found.</p>';
    endif;
    
    // Reset post data
    wp_reset_postdata();
    
    do_action('bbp_template_after_pagination_loop');
    ?>
    

    Then, resave your permalinks.

    #334914
    richardrcook2
    Participant

    Hello. I needed to fix a problem on my website romancingrarehearts.com. While doing so, I deactivated and reactivated Buddypress. Then I found that most of my pages were gone. Is there a trash bin that I can get them back from? Or are they unretrievable? I’m using theme Twenty Fifteen, buddypress 14.0.0, and WordPress 6.6.1.

    #334880
    johngtur
    Participant

    I’m running PHP 8.2, have deactivated all plugins other than BuddyPress, have switched to a default WordPress theme (2023), and have tried BuddyPress 12.2 and 14.0 – and BuddyPress will not send out emails to new members at all.

    This includes when they self-register, when admin sends them reminder emails manually, and when registration moderation is used and admin sends them an approval email.

    The BuddyPress plug-in itself says that emails are successfully sent, but they do not arrive and (when active) the WP Mail Catcher plugin does not record them as having been sent successfully or having failed: it does not acknowledge them at all.

    All other emails from my site work fine when other plugins are active – including 2FA, forgotten passwords and Newsletters. Can anyone suggest what the issue might be, or what next steps I should take to troubleshoot BuddyPress? Thanks.

    itsenaf
    Participant

    Hello,

    I try for hours to create a function, which will display a small red dot on the nav-bars acitivity stream link, when someone posted something new. Since all users are logged in, it should be possible to work with metadata “last_activity_visit”.
    Example screenshot: https://i.imgur.com/eeCvvkj.jpeg
    What I tried:
    Added below code to themes functions.php. Actually managed to display a red dot, when trying around with the code. But either the dot won’t be displayed at all, or it’s displayed always, even when the user visited the acitivity stream.

    
    function track_activity_page_visit() {
        if (bp_is_activity_component()) {
            update_user_meta(get_current_user_id(), 'last_activity_visit', current_time('mysql'));
        }
    }
    add_action('wp', 'track_activity_page_visit');
    
    function has_new_activity_posts() {
        $last_visit = get_user_meta(get_current_user_id(), 'last_activity_visit', true);
    
        if (empty($last_visit)) {
            return false;
        }
    
        $args = array(
            'date_query' => array(
                array(
                    'after' => $last_visit,
                ),
            ),
            'max' => 1
        );
    
        $activities = bp_activity_get($args);
    
        if (!empty($activities['activities'])) {
            return true;
        }
        
        return false;
    }
    
    function add_red_dot_to_menu_buddypress_activity($items, $args) {
        if (is_user_logged_in() && has_new_activity_posts()) {
            foreach ($items as &$item) {
                if (strpos($item->url, '/activity/') !== false) {
                    $item->title .= ' <span class="red-dot"></span>';
                }
            }
        }
        return $items;
    }
    add_filter('wp_nav_menu_objects', 'add_red_dot_to_menu_buddypress_activity', 10, 2);
    

    Any clue? 🙂

    #334788

    This is what I came up with and I think it worked to fix the Avatar quality, however, it won’t impact the Profile images for Groups and Group cover photos. Can you point me in the correct direction for the Constants that work with those two?

    Here’s my code:

    // Set the BP_AVATAR_ORIGINAL_MAX_WIDTH to a higher value
    if ( ! defined( 'BP_AVATAR_ORIGINAL_MAX_WIDTH' ) ) {
        define( 'BP_AVATAR_ORIGINAL_MAX_WIDTH', 1024 ); // Set to match your largest expected upload size
    }
    
    // Adjust the quality of the avatar resizing process
    function custom_bp_avatar_quality( $args ) {
        $args['quality'] = 100; // Set to the highest quality
        return $args;
    }
    add_filter( 'bp_core_avatar_resize_args', 'custom_bp_avatar_quality' );
    add_filter( 'bp_core_avatar_thumb_resize_args', 'custom_bp_avatar_quality' );
    add_filter( 'bp_core_group_avatar_resize_args', 'custom_bp_avatar_quality' );
    add_filter( 'bp_core_group_avatar_thumb_resize_args', 'custom_bp_avatar_quality' );
    
    // Adjust JPEG quality for all images in WordPress
    add_filter( 'jpeg_quality', function() {
        return 100; // Set to the highest quality
    });
    
    // Ensure high-resolution images are used in the HTML output
    function custom_bp_use_full_size_avatar( $html, $params ) {
        if ( isset( $params['object'] ) && in_array( $params['object'], array( 'user', 'group' ) ) ) {
            // Get the full-size avatar URL
            $full_avatar_url = bp_core_fetch_avatar( array(
                'item_id' => $params['item_id'],
                'object'  => $params['object'],
                'type'    => 'full',
                'html'    => false,
            ));
            
            // Construct the new img tag with the full-size avatar URL
            $html = sprintf(
                '<img src="%s" class="%s" alt="%s" width="%d" height="%d"/>',
                esc_url( $full_avatar_url ),
                esc_attr( $params['class'] ),
                esc_attr( $params['alt'] ),
                (int) $params['width'],
                (int) $params['height']
            );
        }
        return $html;
    }
    add_filter( 'bp_core_fetch_avatar', 'custom_bp_use_full_size_avatar', 10, 2 );
    
    // Add custom CSS to scale down the avatars
    function custom_bp_add_avatar_css() {
        $custom_css = "
            .avatar,
            .group-avatar img {
                width: 150px;
                height: 150px;
                object-fit: cover; /* Ensures the image covers the element's entire area */
            }
        ";
        wp_add_inline_style( 'bp-parent-css', $custom_css ); // Adjust 'bp-parent-css' to match your theme's main stylesheet handle if necessary
    }
    add_action( 'wp_enqueue_scripts', 'custom_bp_add_avatar_css' );
    #334781
    Robeen
    Participant

    Hello @thesupercargo

    By the nature of the scenario, there is a chance it’s an isolated scenario that is present in your environment. To get the root, if possible check by yourself by mentioning those mention who are not getting the link. As you mentioned there doesn’t seem to be a pattern, I believe you have done that already and you made sure that there aren’t any spaces, and such a scenario.

    Now, you can check theme/plugin conflicts. Although there is a very low chance that there would be conflicts still. To do that, you can try this plugin: https://wordpress.org/plugins/health-check/ Also please consider checking WP-Admin->Settings-> Discussion to see where there is any moderation for those users.

    If the above are all good, consider checking whether there is any location or any other restrictions from the server side. I haven’t faced such a scenario as well, that’s why, I am curious as well to know what exactly is root cause.

    #334766
    capexpe
    Participant

    Hello BP-developers,

    I also want to thank you for maintaining and developing Buddypress!
    We have been using it for almost 10 years and never had issues when updating to a new version.

    Passing to 14.0.0 was different. Thanks for the BP Classic that fixes many issues for us but as Lars we still cannot have the translation working yet.

    We used to use the buddypress-fr_FR.mo file to change the by default translation of “groupe” (French word for group) in “Expé” for expédition on our site. But changing the buddypress-fr_FR and re-uploading to wp-content/languages/plugins as we were used to do at each update, does not seem to work.

    Here is a link to our website with both public and registered users : where the blue button close to the title should be “Créer une Expé” instead of “Créer un groupe” and the other blue buttons next to each group “Rejoindre l’Expé” instead of “Rejoindre le groupe”.

    Thanks for your help.

    WP 6.6.1
    BP 14.0.0
    Theme : a minimally customed child version of Boss

    #334731

    In reply to: disable rss

    Thanks Venutius, I spent some time using your code along with ChatGPT and this seems to have worked for me, all the feeds are gone….maybe this will help someone else!

    function disable_all_rss_feeds() {
        // Disable all WordPress feeds
        function disable_all_feeds() {
            wp_die(__('No feed available, please visit the <a href="'. get_bloginfo('url') .'">homepage</a>!'));
        }
    
        add_action('do_feed', 'disable_all_feeds', 1);
        add_action('do_feed_rdf', 'disable_all_feeds', 1);
        add_action('do_feed_rss', 'disable_all_feeds', 1);
        add_action('do_feed_rss2', 'disable_all_feeds', 1);
        add_action('do_feed_atom', 'disable_all_feeds', 1);
        add_action('do_feed_rss2_comments', 'disable_all_feeds', 1);
        add_action('do_feed_atom_comments', 'disable_all_feeds', 1);
    
        // Remove RSS feed links from the header
        remove_action('wp_head', 'feed_links', 2);
        remove_action('wp_head', 'feed_links_extra', 3);
    
        // Disable BuddyPress feeds
        remove_action('bp_activity_feed', 'bp_activity_action_sitewide_feed');
        remove_action('bp_activity_sitewide_feed', 'bp_activity_action_sitewide_feed');
        remove_action('bp_member_activity_feed', 'bp_activity_action_sitewide_feed');
        remove_action('bp_group_activity_feed', 'bp_activity_action_sitewide_feed');
        remove_action('bp_member_feed', 'bp_dtheme_activity_feed');
        remove_action('bp_group_feed', 'bp_dtheme_group_activity_feed');
    
        // BuddyPress Nouveau template pack feed removals
        remove_action('bp_nouveau_group_header_meta', 'bp_nouveau_group_meta', 50);
        remove_action('bp_nouveau_group_header_meta', 'bp_nouveau_group_meta', 50);
        remove_action('bp_nouveau_action_activity_content', 'bp_nouveau_activity_feed', 5);
    
        // Disable BuddyPress members feeds
        remove_action('bp_members_directory_members_feed', 'bp_members_feed');
    
        // Disable BuddyPress groups feeds
        remove_action('bp_groups_directory_groups_feed', 'bp_groups_feed');
        remove_action('bp_group_activity_feed', 'bp_group_activity_custom_feed');
    
        // Disable BuddyPress blogs feeds
        remove_action('bp_blogs_directory_blogs_feed', 'bp_blogs_feed');
        remove_action('bp_blog_comments_feed', 'bp_blog_comments_custom_feed');
    
        // Disable BuddyPress forums feeds
        remove_action('bp_forums_directory_topics_feed', 'bp_forums_feed');
        remove_action('bp_forums_topic_feed', 'bp_forum_topic_custom_feed');
    }
    add_action('bp_init', 'disable_all_rss_feeds', 1);
    
    // Disable BuddyPress Nouveau feeds
    function disable_buddypress_nouveau_feeds() {
        remove_action('bp_nouveau_activity_feed', 'bp_nouveau_activity_feed');
        remove_action('bp_nouveau_group_feed', 'bp_nouveau_group_feed');
    }
    add_action('bp_init', 'disable_buddypress_nouveau_feeds', 1);
    
    // Disable pingbacks and trackbacks for privacy
    add_filter('xmlrpc_methods', function($methods) {
        unset($methods['pingback.ping']);
        return $methods;
    });
    
    add_filter('wp_headers', function($headers) {
        unset($headers['X-Pingback']);
        return $headers;
    });
    
    add_filter('pings_open', '__return_false', 10, 2);
    
    // Remove RSS feed div by ID and class using jQuery
    function remove_rss_feed_div() {
        if (is_buddypress()) {
            ?>
            <script type="text/javascript">
            jQuery(document).ready(function($) {
                $('#activity-rss-feed.feed').remove();
            });
            </script>
            <?php
        }
    }
    add_action('wp_footer', 'remove_rss_feed_div');
    
    add_filter( 'bp_rest_api_is_available', '__return_false' );
    #334729

    In reply to: URL page is blank

    Venutius
    Moderator

    check for a bp-custom.php file in your plugins directory, and check if you have anything in the themes functions.php file.

    #334720
    kelly80
    Participant

    I just installed MemberPress for the first time last week. A few years ago, I had tried using BuddyPress and set up a few things, but ultimately went a different way.

    When I reinstalled BuddyPress last week, all of my old settings were still there. I’m wondering if that is the reason that this URL page is blank, because I understand that the assignment of pages has changed in the past year or so.

    I have tried torubleshooting by deactivating all of my plugins besides BuddyPress and I even reverted to one of the default themes and nothing makes the data appear on the URL page.

    Is there a way for me to reset my BuddyPress account so that it takes me through the full install process again? If not that, does anyone have any other ideas why this might be happening?

    #334716
    Venutius
    Moderator

    If you don’t get the issue with astra, then it’s not an issue with BuddyPress, it’s Elementor that is the issue. That’s the reason why we ask you to try with another theme.

    #334710

    In reply to: BP user @mention

    Praveen Kumar
    Participant

    Hi Varun,

    Thanks for your response.

    I was wondering if it’s possible to add a debounce function without modifying the core BuddyPress files. I’ve attempted to create a custom file where I wrap the original remoteFilter function with a debounce function and then enqueue this script in the theme’s functions.php file.

    Here’s the approach I’ve taken:

    mentionsDefaults.callbacks.remoteFilter = debounce(function(query, render_view) {
    originalRemoteFilter.call(this, query, render_view);
    }, debounceTime);

    Could you please advise if this is the correct approach or if there is a better way to achieve this?

    capexpe
    Participant

    WP version : 6.6.2
    Buddypress : Version 14.0.0
    Theme : Boss
    (I have checked with Twenty Twelve and it still does not work)
    Our Website : https://capexpe.org

    We have been running this website under Byddypress since more than 10 years without any issues. We regularly update to new version without any major issue so far. Thanks a lot for your work.

    When we upgraded to 14.0.0, the site still runs fine except when accessing a group, any group, (called “expe” on our site).

    Here is an example of on Expe (group) : https://capexpe.org/expes/les-debuts-de-lalpinisme-en-autonomie/

    Any idea what I could do to identify and fix what we consider a major issue for us?

    Thanks in advance for your help.

    Dom

    #334693
    Varun Dubey
    Participant

    @traqbar It seems to be working fine. Try debugging using the default theme and only BuddyPress to find which plugin is causing the issue.

    #334688
    #334656
    744691223097925
    Inactive

    Backstory: I have a Divi Theme and have added member press to that theme as part of that they have a Buddypress integration.

    Problem: whenever I activate the buddy press plugin the formatting of the account page goes weird, the Logo becomes massive the menus all go into a column and it looks awful. Has anyone else had this problem?

    esg2
    Participant

    When I create a non admin profile I do not have access to notifications, messages, or settings. I can only view profile. When I log in on my admin profile I have access to all of these actions. How can I allow non admin users this access. I have tried disabling plugins 1×1 but still not working. Have also tried changing theme.

    Website: https://eshansite6.wpcomstaging.com/
    WP version: 6.6
    BP Version: 14.0

    #334628

    In reply to: Website error

    Varun Dubey
    Participant

    @garymorris, contact your BeSocial theme support to fix the issue.

    reza
    Participant

    Hello
    WordPress version 6.5.5 buddypress v. 14.0.0
    Just gorup have a problem
    Google webmaster:
    Page availability
    Page cannot be indexed: Redirect error
    URL will be indexed only if certain conditions are met
    Discovery
    Not checked in live tests
    Crawl
    Time
    Jul 13, 2024, 12:58:21 AM
    Crawled as
    Google Inspection Tool smartphone
    Crawl allowed?
    Yes
    Page fetch
    error
    Failed: Redirect error
    ————————
    SSL ok
    I can’t see any redirect code…
    I changed theme and test it…
    🙁🙁🙁

    #334606
    Venutius
    Moderator

    That’s interesting, I don’t have this issue myself as far as I can see. Certainly, using the Android “app” that I use, it’s fine. My theme does not touch the WordPress top=bar menu, as far as I can see. I use Graphene.

    #334531
    Mathieu Viet
    Moderator

    Hi @koka777

    Thanks for your feedback. I just tested and wasn’t able to reproduce.

    Theme: Twenty Twenty-Four
    BP Template pack: Nouveau & Legacy (tested with both template packs)
    No other plugins than BuddyPress
    No custom code into wp-content/mu-plugins or wp-content/plugins/bp-custom.php

    I created a public group being logged as an Admin.
    I created a subscriber, logged in as this subscriber, went to the Groups directory, clicked on the join button.
    Result: the join button turned into a leave button and I was successfully added as a member of the group.
    I created a group being a subscriber, logged out then logged in as an Admin. I was also able to join a group from the Groups directory.

    Can you explain just like I did above, the steps you are doing to get the “Error joining this group.” message?

    Please make sure to deactivate any plugins, custom code, and activate a WordPress default theme like Twenty Twenty-Four.

    #334530
    Koka boka
    Participant

    Hello, thank you for your work. I just started testing BuddyPress 14.0.0-RC1 To immediately clarify and rule out any issues related to my theme, I checked everything again using the Twenty Twenty-Four theme with all third-party plugins disabled. In fact, in version 14.0.0-RC1, it is impossible to join groups from the group listing page; an error occurs – “Error joining this group.” From the group page, pressing the join button elicits no response.

    #334500

    In reply to: Who is online

    werny
    Participant

    In my Theme Gwangi I can only increase it to a maximum of 15 users.
    Is there a way to have more?

    #334453
    Kokiri
    Participant

    @vapvarun

    Isn’t compatible with the theme I’m using since it’s highly customized and the framework is REACT.

    #334446

    In reply to: Custom Development

    Varun Dubey
    Participant

    Ensure the BuddyPress plugin is active and add custom code in child theme functions.php or a custom plugin or using the code snippet plugin. xprofile_get_field_data is a valid function https://hooks.wbcomdesigns.com/reference/functions/xprofile_get_field_data/

Viewing 25 results - 151 through 175 (of 31,071 total)
Skip to toolbar