Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 51 through 75 (of 32,313 total)
  • Author
    Search Results
  • #241392
    George
    Participant

    I want to remove the “Forum” step from the BuddyPress group creation step but keep the group forums active. I have tried many solutions but I can’t seem to find a filter I could use.

    For example, this code:

    add_filter( 'groups_create_group_steps', function ( $steps ) {
        unset( $steps['group-settings'] );
        return $steps;
    } );

    removes the group settings from the group creation process.

    This code:

    function buddydev_remove_group_admin_settings() {
    
        if ( ! bp_is_group() ) {
            return;
        }
    
        bp_core_remove_subnav_item( groups_get_current_group()->slug . '_manage', 'group-settings', 'groups' );
    
        // reattach screen function to avoid 404.
        add_action( 'bp_screens', 'groups_screen_group_admin', 3 );
    }
    
    add_action( 'bp_template_redirect', 'buddydev_remove_group_admin_settings', 1 );

    removes the group settings from the Group “Manage” menu.

    Using this:

    function remove_unwanted_group_creation_steps() {
        global $bp;
        if ( isset( $bp->groups->group_creation_steps['forum'] ) ) {
            unset( $bp->groups->group_creation_steps['forum'] );
        }
    
    }
    add_action( 'bp_before_create_group_content_template', 'remove_unwanted_group_creation_steps', 9999 );

    removes the step but leaves the /create/step/forum/ step active, thus messing with the custom number of steps I have.

    Can you please help?

    #241383
    Kokiri
    Participant

    Hello,

    So I am trying to add Topics Counts and Reply counts in a widget box on activity page or member profiles – I’ve tried BBP Style Pack and the shortcodes don’t work.

    Any suggestions?

    #241339
    Salvatore Noschese
    Participant

    Thanks for reply but, sorry…
    Installed and keymaster issue (so, nothing work, I need to fix via your plugin): this is an important issue (cannot work without the fix by your plugin).
    Also, not work in FSE and also with your plugin I have bad result.
    FSE is out and default theme in wp from about 4 yrs and still not supported from bbpress.

    This really looks like an abandoned project.
    Other minor project (like asgaros
    And similar) work out of the box (install, shortcode, all work as expected).

    Best regards and I really hope bbpress team can work to fix asap this issue.

    #241337
    Salvatore Noschese
    Participant

    I tried to reinstall bbPress after a long time, but encountered several issues.

    First, there was no keymaster role after installation, which made the plugin unusable. I had to fix it via the BBP Style Pack plugin using the keymaster fix. It seems strange that I need one plugin just to make another work.

    After that, I faced a blank page issue. Even though the BBP Style Pack plugin helped fix this as well, I still encountered problems—such as the shortcode in the footer not being parsed and some graphical glitches.

    It seems impossible now to simply install bbPress, add a shortcode to a page, and use it like I did years ago.

    I’m really disappointed with the current state of the plugin. It feels like it has been abandoned.

    #241307
    Robin W
    Moderator

    but if you mean ‘error’ as in

    Warning: Illegal string offset ‘remember’ in /home/ob57bjdn4ubo/domains/tremendosaur.com/html/wp-includes/user.php on line 39

    then yes that would be useful, just take out the site name if that is what is worrying you

    #241305
    abd2002
    Participant

    i can’t share the link as it is linked to backend code, but i can share the screenshot of error page

    #241288
    gkldh
    Participant

    @robin-w thanks for share this code. is this possible to provide a separate trash tab display on profile for view all tresh message ? because right now when reply not permanently delete from admin until then post count display same on frontend. As of now user can’t permanently delete trash messages from frontend.

    regards
    gaurav

    #241287
    Robin W
    Moderator

    it cannot be removed with remove_action as the code is not part of an action.

    input#bbp_topic_tags {
    display: none;
    }
    label[for=bbp_topic_tags] {
    display: none !important;
    }

    Putting the above in your custom css area should do it

    #241285
    Robin W
    Moderator

    sorry, I just help out here, there are many things on localhost that are different including htaccess and maybe many others

    I have never developed on localhost, nothing against those that do, but developing on the same server using exactly the same code as live enables you to have confidence that the performance and configuration is exactly the same, just my view 🙂

    Anyway glad you are fixed !

    #241284
    gkldh
    Participant

    yes, @robin-w its working on server side by default buddyx-theme/twentytwenty and no need any additional code add. May i know the reason why didn’t work on localhost ??

    And Next time I will test it on the server first. If I face any problem then I will post it.

    thank you so much your great help @robin-w

    #241282
    gkldh
    Participant

    @robin-w thanks for reply, i have use child theme. but your code not working.

    i tried your code with both type :
    return 'http://localhost:8888' . $_SERVER['REQUEST_URI'];
    return 'http://buddypress.local/' . $_SERVER['REQUEST_URI'];

    screenshot : https://prnt.sc/CSTMlQ1ChCaG

    #241281
    Robin W
    Moderator
    add_filter( 'bbp_verify_nonce_request_url', 'my_bbp_verify_nonce_request_url', 999, 1 );
    function my_bbp_verify_nonce_request_url( $requested_url )
    {
    return 'http://localhost:8888' . $_SERVER['REQUEST_URI'];
    }

    Put this in your child theme’s function file –

    ie wp-content/themes/%your-theme-name%/functions.php

    where %your-theme-name% is the name of your theme

    or use

    Code Snippets

    #241269
    gkldh
    Participant

    thanks jon, its working. Can it be removed with remove_action('','') this also?

    #241262
    Mads Gram-Hansen
    Participant

    Disabling Dynamic CSS in Divi (as advised by @robin-w here) worked for me too.

    When using the Divi Theme Builder you can not create a template for the user profile page. That is unexpected.

    Is it because the user profile page is not created as a custom post type like Topic, Reply etc.?
    It looks like that when I inspect the plugin code (especially the template.php-files in the includes folder).

    If the user profile page (and search page) was created as a custom post type, would it fix these situations (?):
    – that you have to disable Dynamic CSS in Divi to get the stylesheets to load
    – that you can’t create a template for profiles with the Divi Theme Builder
    – the similar issue with the other themes

    Best regards and thanks for a great plugin!
    /Mads

    #241259
    Robin W
    Moderator

    many plugins that do advertising have code you can use, and bbpress has many hooks you can use to insert.

    If you want to say what and where, I may be able to give you further help.

    #241227
    gjyshi
    Participant

    as i see bbp_theme_after_forum_freshness_link is useful to output the list of users information of the topic id.

    but I don’t know how to retrieve the list of user avatars to make something like this

    Any one can help? How can i display max first 10 users who contributed to the topic?

    #241214
    sunshineday77
    Participant

    Hi Robin! Is it possible there is a short code to the user’s profile that we could put in the emails that takes them right to their profile to unsub?

    delaitec
    Participant

    When Jetpack is active, when trying to edit a Topic, Forum or Reply, through the WordPress administrative panel with Jetpack active.
    An error is displayed below the text editing toolbar.

    Failed to load plugin url: https://mydomain.com.br/site/wp-
    content/plugins/jetpack/jetpack_vendor/automattic/jetpack-forms/src/contact-form/../../dist/contact-form/js/tinymce-plugin-form-button.js

    #241210
    cadenr
    Participant

    Yea, that makes sense. Do you know if there’s any workaround that could be done? I have the Uncanny Automator plugin too, so I’m trying to figure out if there’s a way to run some code that triggers whenever a user is added to a learndash group and preforms an action that checks if there’s a private group made with that name and adds them to it.

    #241183
    Robin W
    Moderator

    related to your ultimate member plugin, but put this code in your themes additional css

    @media only screen and (max-width: 600px) {
      .um.um-login, .um.um-register {
        width : 70% !important;
      }
    }

    you can change the 70% to alter the width to what you want

    #241162
    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');
    ?>
    
    #241138
    Robin W
    Moderator

    you can use

    add_action ('bbp_template_after_single_forum' ....
    add_action ('bbp_template_after_single_topic' ....
    #241136
    delaitec
    Participant

    Hello, how are you?

    I would like to insert a social login shortcode below the login form that is displayed when we try to publish a post without being logged in.

    This is the shortcode [Heateor_Social_Login]

    Thanks in advance to everyone who can help

    #241108
    Robin W
    Moderator

    No idea of it is compatible, but bbpress has custom post types of reply, topic and forum, use these calls and see if they work

    add_post_type_support( bbp_get_reply_post_type(), 'shortlinks' );
    add_post_type_support( bbp_get_topic_post_type(), 'shortlinks' );
    add_post_type_support( bbp_get_forum_post_type(), 'shortlinks' );
Viewing 25 results - 51 through 75 (of 32,313 total)
Skip to toolbar