Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 2,201 through 2,225 (of 32,466 total)
  • Author
    Search Results
  • #215904
    patrick_here
    Participant

    Thanks very much Robin!
    …that suggestion to target #bbpress-forums worked!

    I’m getting a crash course in why some people like Elementor and others don’t. I think I’m in the latter camp.

    ๐Ÿ™‚

    One final comment: I’m surprised that bbpress code is outputting text as important as the forum description without surrounding it in tags so that it could be specifically targeted by some css.

    #215896
    Ulrik
    Participant

    Thanks, the shortcode did the job.

    [bsp-display-topic-index show=’5′ template =’short’]

    Thanks!

    #215895
    iconuser
    Participant

    Self-resolved.
    I used bbp_is_single_forum() to specify a forum with forum ID:2 by using is_single( 2 ) instead of all forums.

    #215894
    iconuser
    Participant

    Nice to meet you.
    I am currently creating a bulletin board service and would like to display the text formatting in the topic creation form, and I am using the URL below as a reference.
    https://bbp-customize.com/topic-form-template/

    In this article, you say “The above code sets up a common format for all the forums, but you can also set up a separate format for each forum by splitting it up by forum ID”, but I don’t know how to split it up for each forum ID.

    I’ve looked it up, but it doesn’t work and I’m stuck.

    Specifically, I would like to know how to display the text formatting only for forum ID:2 when there are forums with forum ID:1 and forum ID:2.

    Sorry this is a very rudimentary question, thank you for your help.

    #215888
    Robin W
    Moderator

    this might also improve things

    #bbpress-forums {
    	font-family: "c", Sans-serif !important;
    }

    otherwise I see you have style pack installed, so work through the font sections and make them “Playfair Display”, Sans-serif

    #215887
    Robin W
    Moderator

    agree

    on the title this might work

    .post-285 h1.entry-title {
    	font-family: "Playfair Display", Sans-serif;
    }
    #215886
    patrick_here
    Participant

    Hmmm… Thanks very much Robin…

    Someone else implemented this website with elementor (free version) …I’ve never worked with Elementor before.

    As best as I can tell, that post-26.css is a generated css file generated under uploads/elementor/css/post-26.css. Perhaps this is really an elementor question…

    In view of the fact that I’m using a shortcode on a page to get my forum index to appear, I’m trying to figure out how to get the forum to appear on the page in a way that will leave me free to style the forum:

    • As it is now the entire forum inherits the elementor styles. (I would need the header and footer from the elementor theme but wouldn’t want the elementor styling in the body where the forum bbPress shortcode is located)
    • A separate problem is that, in at least some cases, it seems that the forum description text itself is not surrounded by any html tag at all so it seems that I would not be able to target it with a specific css selector …it could only inherit styling from an outer selector higher up the chain.
    #215885
    Robin W
    Moderator

    it is caused by this line

    .elementor-kit-26 h1 {
     font-family:"Playfair Display SC", Sans-serif;
    }

    in

    post-26.css

    related to elementor, so may be a setting in that or your theme.

    In essence the Playfair Display SC font is all capitals

    https://fonts.google.com/specimen/Playfair+Display+SC

    so all your headings will be capitals

    #215880
    patrick_here
    Participant

    Hello,
    I just installed bbpress on a new website. I have given descriptions (or subtitles) to some of the forums. On the forum index, these descriptions show up in all uppercase (And when I check the code in Firefox Inspector I can see that there isn’t even any styling tag around the descriptions).

    I can’t figure out what the problem is. What is causing this and how should I fix it? Thanks for the help.

    Patrick

    #215874
    Robin W
    Moderator

    ah, I see what you ae getting at – not sure how this site does it, but you can create a link to a page in your site and put

    [bbp-topic-index] in that page – that will show the latest 15 topics

    If you want better than that, then

    bbp style pack

    once activated go to

    dashboard>settings>bbp style pack>shortcode

    and check out the

    [bsp-display-topic-index] which has lots of settings you can use to control what is shown

    dashboard>settings>bbp style pack>Custom CSS

    #215855
    Robin W
    Moderator

    If I understand

    add_action ('bbp_theme_after_topic_form_tags' , 'rew_tag_desc' ) ;
    add_action ('bbp_theme_after_reply_form_tags' , 'rew_tag_desc' ) ;
    
    function rew_tag_desc () {
    	echo '<p>words here</p>' ;
    }

    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

    #215850

    In reply to: login issues

    kylewhenderson
    Participant

    I just installed the Ultimate Member plugin. The frontend login shortcode that comes with that plugin works as expected, so not sure what this issue is with the bbPress Login Widget, but something is certainly not right.

    I totally get that many people should be complaining if it were obviously broken, but especially after testing a clean WP core and bbPress install it seems that this isn’t likely to be an edge case.

    Again, let me know if you have any specific questions that I can help with to debug.

    Thanks!

    #215838
    Robin W
    Moderator

    just tried it on my website, and that code works fine.

    3 possibilities

    1. the 90 is wrong
    2. the 90 forum does not have sub forums
    3. some other code is filtering the bbp_forum_get_subforums function

    If you are happy it is not 1 or 2, then it could be a theme or plugin issue

    Themes

    As a test switch to a default theme such as twentyfifteen, and see if this fixes.

    Plugins

    If that doesn’t work, also deactivate all plugins apart from bbpress and see if this fixes. if it does, re-enable one at a time to see which is causing the error.

    If you cannot do this to your site (say because it is live) then use the ‘troubleshooting’ features of this plugin to let you test without affecting other users

    Health Check & Troubleshooting

    Then come back

    #215835
    yurius
    Participant

    I tried this but result is
    array(0) { }
    It’s still empty.

    #215824
    Robin W
    Moderator

    try

    $sub_forums = bbp_forum_get_subforums(90);
    var_dump($sub_forums);
    #215819
    yurius
    Participant

    I want to list the subforums under the category. My forum structure is like this:
    Category A
    – Subforum1
    – Subforum2
    – Subforum3

    When parent category id is ’90’, I expected to get subforums of category 90.

    $sub_forums[] = bbp_forum_get_subforums(90);
    var_dump($sub_forums);

    This returns empty array. Please let me know if my usage is wrong.

    #215795

    In reply to: Post header

    Robin W
    Moderator

    close – means the post still shows, but no-one can add to it
    Trash – means put in trash, so the post is no longer shown
    Unapprove – makes the topic pending – it is not seen in by users, only moderators and keymasters
    sticky – puts the post above ordinary posts in the list – typically to have a topic always at the top

    Keymaster โ€“ Can create, edit and delete other usersโ€™ forums, topics and replies. Can manage Tags, and moderate a forum with the moderation tools. Has access to global forum settings, tools, and importer.
    Moderator โ€“ Can create and edit forums. Can create, edit and delete other usersโ€™ topics and replies. Can manage Tags, and moderate a forum with the moderation tools.

    bbPress User Roles and Capabilities

    #215783
    berry metal
    Participant

    Hi again,

    I added this code:

    if ( function_exists( 'bbp_enqueue_script' ) && function_exists( 'bbp_get_version' ) ) {
        bbp_enqueue_script( 'bbpress-engagements', 'js/engagements.js', array( 'jquery' ), bbp_get_version(), true );
    }

    so now it looks like this:

    add_shortcode( 'bbpresscomments', function() {
        $output     = '';
        $current_id = function_exists( 'vcex_get_the_ID' ) ? vcex_get_the_ID() : get_the_ID();
        $topics = new WP_Query( array(
            'post_type' => 'topic',
            'posts_per_page' => -1,
            'fields' => 'ids',
        ) );
        if ( $topics->have_posts() ) {
            // enqueue scripts on this next line...
            if ( function_exists( 'bbp_enqueue_script' ) && function_exists( 'bbp_get_version' ) ) {
        bbp_enqueue_script( 'bbpress-engagements', 'js/engagements.js', array( 'jquery' ), bbp_get_version(), true );
    }
            foreach( $topics->posts as $topic ) {
                if ( get_the_title( $topic ) == get_the_title( $current_id ) ) {
                    $output .= do_shortcode( '[bbp-single-topic id="' . intval( $topic ) . '"]' );
                }
            }
        }
        return $output;
    } );

    because I can see that code that enables all functionality including AJAX, is only enqueued for bbPress pages:

    https://github.com/bbpress/bbPress/blob/afa6030c3e27c4fe582743074a603d25b5e4de48/src/templates/default/bbpress-functions.php#L151

    And it’s not enabled for bbPress shortcodes.

    Is this right?

    Could you please tell me what is wrong with my code, and why cannot I enqueue the scripts that will enable AJAX for the shortcodes?

    Instead of proper enqueuing, my code makes the buttons not work at all, when I click on them, nothing happens.

    #215780
    Adam
    Participant

    Looking in the browser developer tools, I think I can see what is happening. The problem is:

    #bbpress-forums {
        background: 0 0;
        clear: both;
        margin-bottom: 20px;
        overflow: hidden;
        font-size: 12px; 
        line-height: 18px;

    and then there’s also .bbp-breadcrumb and .bbp-template-notice and so on.

    And then there’s this CSS class defining the width inside the standard WP entry-content:

    .entry-content > *:not(.alignwide):not(.alignfull):not(.alignleft):not(.alignright):not(.is-style-wide) {
        max-width: 57rem;
        width: calc(100% - 4rem);
    }

    What do you recommend as the best way forward, bearing in mind I will probably forget all about this after a couple of months! ๐Ÿ˜†

    A child theme from Twenty Twenty?

    Or just the appropriate CSS in the WP theme Additional CSS dialog?

    #215773
    yurius
    Participant

    When I input terms to the search form, it redirect to index.php.
    <?php bbp_get_template_part( 'form', 'search' ); ?>

    I went through troubleshooting here and changed search slag to ‘find’ but it couldn’t resolve.

    Search Redirects to Front Page


    I also tried common troubleshooting here: https://codex.bbpress.org/getting-started/troubleshooting/
    Nothing changed.

    It seems my customized theme causing an issue because it worked when I switched to the default ‘Twenty Nineteen’ theme it worked.
    But I have no idea which part is causing the issue. Can somebody help?

    #215769
    Adam
    Participant

    Hi,
    I’m struggling to set up bbPress so that the forum style adheres to the website style.

    I wasn’t able to find the right place to change the font size on this page linked to above despite your guidance ๐Ÿ™

    I’m trying to read my way through the bbPresss documentation in codex.bbpress.org but it starts off getting right into the nitty-gritty by recommending I create a child theme and start writing CSS.

    I’m using Twenty Twenty theme for the main site. I read that I might need to create a bbPress theme – but I think I need to read a lot more about that.

    Any help gratefully received!

    #215745
    Robin W
    Moderator
    add_action ('bbp_template_before_single_forum' , 'rew_add_html' ) ;
    
    function rew_add_html () {
    	echo '<b>hello</b>';
    }

    and amend echo '<b>hello</b>'; to what you want

    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

    #215744
    RedTravelMaster
    Participant

    Hello,

    I’d like to be able to add some custom html code to my forum pages, under the forum title and breadcrumbs, but before the first forum topic. How would I go about doing this?

    Thank you for any assistance.

    Ron

    #215740
    berry metal
    Participant

    The reason is hard for me to debug this issue is that I am using this code to output a bbpress topic under each post that has the same name as the current post title:

    add_shortcode( 'bbpresscomments', function() {
        $output     = '';
        $current_id = function_exists( 'vcex_get_the_ID' ) ? vcex_get_the_ID() : get_the_ID();
        $topics = new WP_Query( array(
            'post_type' => 'topic',
            'posts_per_page' => -1,
            'fields' => 'ids',
        ) );
        if ( $topics->have_posts() ) {
            foreach( $topics->posts as $topic ) {
                if ( get_the_title( $topic ) == get_the_title( $current_id ) ) {
                    $output .= do_shortcode( '[bbp-single-topic id="' . intval( $topic ) . '"]' );
                }
            }
        }
        return $output;
    } );

    This code is theme specific, so testing with an other theme doesn’t make sense in this case.
    I will open now a ticket to my theme developer, but if you can see anything in this code that would make AJAX not work, please let me know.

    Thanks.

    #215708
    samtime
    Participant

    Okay, got the following solution from a friend and it seems to work!
    Posting the updated code here incase others have the same problem:

    add_filter('woocommerce_disable_admin_bar', '_wc_disable_admin_bar', 10, 1);
     
    function _wc_disable_admin_bar($prevent_admin_access) {
        if (!current_user_can("keymaster") && !current_user_can("bbp_moderator") ) {
            return $prevent_admin_access;
        }
        return false;
    }
Viewing 25 results - 2,201 through 2,225 (of 32,466 total)
Skip to toolbar