Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 51 through 75 (of 32,294 total)
  • Author
    Search Results
  • #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' );
    delaitec
    Participant

    Hello. I hope you are well!

    When using jetpack link shortener feature “wp.me”, this feature does not work with jetpack link sharer (whatsapp, facebook, etc)

    This was solved with the plugin: “Shortlinks for Jetpack sharing buttons” by Jeremy Herve.
    See here:
    https://br.wordpress.org/plugins/jetpack-shortlinks-for-sharing-buttons/

    However, the plugin only works natively on standard WordPress posts and pages, on custom post types like Woocommerce, it does not work.

    Here’s a way to fix this:
    https://jetpack.com/support/wp-me-shortlinks/
    As the post type for woocommerce products is “product”, the code looked like this:

    add_action( 'init', function () {
    add_post_type_support( 'product', 'shortlinks' );
    });

    It is now possible to share woocommerce products with shortened links using jetpack share buttons.

    I would like to know if BBPress is compatible with Jetpack’s sharing feature, and what type of post should I use so that shares can be made using the link shortener as I did above in Woocommerce.

    Grateful.

    #241087
    Robin W
    Moderator
    #241078
    neon67
    Participant

    Great idea, close everything in css.
    I first tried your option – so far it’s not working. This can’t happen? I added it’s important! No result. I looked in the code – it’s super-sticky. No again. I set the class-dot and it worked. This is what works for me:
    .hiddensticky .super-sticky {
    display: none;
    }
    An entry about sticks in the shortcode is not needed.

    Thank you very much for your help.😍

    #241077
    Robin W
    Moderator

    ok, so before the shortcode block, add a custom html block saying

    <div class="my-block-name">

    then your block with the shortcode you dont want the sticky to show in

    then another custom html block with

    </div>

    then use

    .my-block-name sticky {
    display : none ;
    }
    #241076
    neon67
    Participant

    Еverything according to the recipes bbP shortcodes 2.8 – works. Stickies are always shown if they are marked by the admin.
    There were several layers in my CSS code – I need to figure it out. I just wanted to make sure that everyone’s bbP shortcodes 2.8 is working properly.

    #241039
    neon67
    Participant

    Thanks for your feedback!
    I use the bbP shortcodes 2.8 plugin only, don’t have the style pack plugin. The bbp-display-topic-index shortcode works great with both double or single quotes—everything! except for sticker management. In the web code, the line that I want to disable is written as .bbp-topics ul.super-sticky, .bbp-topics-front ul.super-sticky – this is all standard, I didn’t change anything.

    Maybe the problem is the shortcode is used twice on the page? I plan to allow stickers in one block, but prohibit them in the second – other forums and stickers are not appropriate there.

    #241038
    Robin W
    Moderator

    I think you are using the style pack plugin shortcodes, in which case it is bsp not bbp.

    Also the above is using the wrong apostrophies, it may be because you pasted without using the code button

    This should work

    [bsp-display-topic-index show="6" forum ="2692,2696,2697,2698,2700,2702" show_stickies="false"]

    If not come back

    #241028
    Ketil Ervik
    Participant

    In css of the style pack plugin. But i have try also try it on theme’s custom codes, but nothing happen!

    #241026
    Robin W
    Moderator

    yes, but WHERE did you put this code?????

    Custom css of the style pack plugin, your theme’s custom code or elsewhere?

    #241025
    neon67
    Participant

    Hi. I use a shortcode from bbP shortcodes like [bbp-display-topic-index show=’6′ forum =’2692,2696,2697,2698,2700,2702′ show_stickies=’false’] Question about Stickies – the display does not depend on this records – false or true. I even tried to write no – it doesn’t help either, the topics are always shown at the top.
    BBpress 2.6.11
    How is this solved?

    #241023
    Ketil Ervik
    Participant

    .bbp-forum-content ul.sticky, .bbp-topics ul.sticky, .bbp-topics ul.super-sticky, .bbp-topics-front ul.super-sticky {
    background-color: rgb(36, 37, 37) !important;
    }
    .bbp-template-notice, div.indicator-hint {
    background-color: rgb(45, 46, 46);
    border-color: rgb(93 93 93);
    color: rgb(229, 224, 216);
    }

    You se the first code come true and chage the color
    But the secend

    .bbp-template-notice, div.indicator-hint {
    background-color: rgb(45, 46, 46);
    border-color: rgb(93 93 93);
    color: rgb(229, 224, 216);
    }

    dont change anything!

    #241018
    Ketil Ervik
    Participant

    I changed the color visually via the web browser and then copied the code into Custom CSS, but when I then refresh the page, it again shows the color I wanted to change, so this didn’t help! See the image of the code I wrote in Custom CSS

    What am I doing wrong here, why didn’t the color change? See the image of the code I pasted into Custom CSS

    I use bbPress Version 2.6.11 and wp version: 6.6.1.
    I am also using bbp style pack Version 6.0.6.

    https://drive.google.com/file/d/10K7mu5ipMPwsPtfEneTZ5PpmRjq4Ilhn/view?usp=sharing

    #240992

    In reply to: Email template edit

    chauhangarima
    Participant

    Okay, so how can we override the code for sending emails?
    Any filter or hook that can we use.

    #240991

    In reply to: Email template edit

    Milan Petrovic
    Participant

    Since bbPress sends emails in ‘bulk,’ every recipient gets the same message; there is no way around that. There was some discussion of changing how emails are sent, but that is a very complex issue right now.

    The only way to resolve this is to override the bbPress code for sending emails and write a new one to do what you need. But, that needs to be custom-coded, and it would not be cheap to do.

    #240985

    In reply to: Email template edit

    chauhangarima
    Participant

    How can i get the Recipient Email in New Reply Email Body just like the other code e.g {site_title} in this bbp style pack plugin. Can you please help me out.

    #240954
    Robin W
    Moderator

    It would probably take me a day to extract the relevant code.

    The style pack plugin is designed to only run what is necessary, so files are pretty much only loaded as needed. If you are only running for FSE suppprt, I suspect that you would struggle to see any difference in site load time.

    #240909
    Robin W
    Moderator

    care to share the code?

    #240899
    terrenuit
    Participant

    Hi,
    I setup another new forum( two different forums on my site), his name is Aid,
    my short code is:
    [bbp-single-forum id=$forum_Aid]
    but it doesn’t work,

    #240875
    Robin W
    Moderator

    Maybe create a forum called say ‘announcements’
    Then create a page called whatever you wish
    Into that page put the following shortcode
    [bbp-single-forum id=$forum_id]
    Where $forum_id is the forum id

Viewing 25 results - 51 through 75 (of 32,294 total)
Skip to toolbar