Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 7,501 through 7,525 (of 32,569 total)
  • Author
    Search Results
  • #168351
    Robkk
    Moderator

    Are you talking about where it says something similar to this in the body class. Most themes add this not really bbPress itself. If you are missing this <?php body_class(); ?> in your theme you not be able to see the post id.

    postid-652

    Or for the topic list of the forum where it shows this.

    bbp-forum-652

    If you have been heavily editing bbPress templates in your child theme you may not have this in correctly in loop-single-forum.

    <ul id="bbp-forum-<?php bbp_forum_id(); ?>" <?php bbp_forum_class(); ?>>

    #168331

    In reply to: Author avatar issue

    Pascal Casier
    Moderator

    Adapt the ’20px’ to the size you want:

    .bbp-forum-title {
    	font-size: 20px;
    }

    PS. ne jamais dire ‘last question’… you never know what comes up next πŸ™‚

    #168328
    o.m.j
    Participant

    sorry to bump such a old topic, but can someone show the specifc code to add to child theme functions.php? still learning here…

    I tried adding this to functions, but produced an error…

    function bbp_title_max_length( $default = 90 ) {
    	echo bbp_get_title_max_length( $default );
    }
    	/**
    	 * Return the maximum length of a title
    	 *
    	 * @since bbPress (r3246)
    	 * @param $default bool Optional. Default value 90
    	 * @uses get_option() To get the maximum title length
    	 * @return int Is anonymous posting allowed?
    	 */
    	function bbp_get_title_max_length( $default = 90 ) {
    		return (int) apply_filters( 'bbp_get_title_max_length', (int) get_option( '_bbp_title_max_length', $default ) );
    	}

    thx!

    #168326
    Pascal Casier
    Moderator

    OOOPS! THAT PAGE CAN NOT BE FOUND

    #168322

    In reply to: Author avatar issue

    Pascal Casier
    Moderator

    Encore ? :-p

    .bbp-footer {
    	display: none;
    }

    Pascal.

    leev
    Participant

    If you inspect the body tag of this website in this/the “request and feedback” forum page, you can see that the id number for the forum is 652. If you go to any topic in this “request and feedback” forum and inspect the code in there, you can see that there is a number, 652, identifying that the topic is posted in the “request and feedback” forum.

    Basically, I want to add the forum id number class to the <body> depending on the forum, or the topic that is posted in that forum.

    Example, <body class=”[forum_id_number]”>.

    #168313

    In reply to: Author avatar issue

    Pascal Casier
    Moderator

    For the avator, it will be something like this to add as CSS somewhere:

    .bbp-author-avatar .avatar-14 {
    	width: 30px;
    }

    A+

    #168291
    Pascal Casier
    Moderator

    Hi,

    I forgot to check the box that says β€œnotify me of follow ups,”
    See to the left of these message, probably the 6th option. You can (un)subscribe by just clicking there πŸ™‚

    but then duplicates that post as the first reply
    The only thing I can think of is another plugin or some code you added in a child theme or functions.php file. Did you try to deactivate other plugins to see it you still had the issue ?

    Pascal.

    #168288
    Rourke
    Participant

    Oops, I copy/pasted but forgot to edit the line. This is the correct one for anyone else trying to do this in the future:

    $mykeymasters = get_users( array('role' => 'bbp_keymaster') );

    #168286
    Rourke
    Participant

    Ah! The difference was the bbp_keymaster instead of the keymaster. This worked for me:

    $mykeymasters = get_users( array('role' => 'keymaster') );

    Thanks Pascal! You really helped me out here πŸ™‚

    #168285
    Pascal Casier
    Moderator

    Euh, yes of course.

    Can this help you then ?

    $user_query_full = new WP_User_Query( array( 'role' => 'bbp_keymaster' ) );
    $user_query = $user_query_full->get_results();
    var_dump( $user_query );

    Pascal.

    #168283
    Pascal Casier
    Moderator

    Ah ok,

    Then how about:
    $mykeymasters = get_users( array('role' => 'keymaster') );

    https://codex.wordpress.org/Function_Reference/get_users

    Pascal.

    #168282
    Rourke
    Participant

    Thanks Pascal,

    I’m actually making a shortcode to format a list of users that have the earlier mentioned roles. This shortcode will be used on a page for the front-end.

    It’s basically a list of site staff members.

    #168276
    TKServer
    Participant

    I’ve figured out the answer to my own question.

    This field is related to the buddy press field wp_bp_activity. That shows something like “joe user replied to the topic xxx in the forum xxx”

    _bbp_activity_id isn’t necessary for my reply to code on my particular site for bbpress to work properly. It IS however necessary if I want my Buddy Press integration to reflect activity updates related to the forum.

    #168273
    jovito
    Participant

    Hi,
    this is in WP 4.3.1 GeneratePress child theme.
    So far I have managed to display forum indices, topics, registration, login on actual WP pages so they can easily be designed and targeted through regular hyperlinks and menus. I used plugins like bbp StylePack and CleanLogin for this, plus the bbp shortcodes on the concerned pages.
    Now there is at least one loophole that renders everything useless. e.g. when submitting a new topic the system jumps to “Topic” view where my page style settings are ignored. Is there sth like a template for the display of topics?

    Also isn’t there a list of shortcodes somewhere that show ALL attribute options, too? The bbp codex https://codex.bbpress.org/features/shortcodes/ lists only the codes, without options.

    #168268
    Pascal Casier
    Moderator

    Hi,

    I am aware of snippets of code that exist, but they seem to have some small issues. What plugin are you referring to ?

    Pascal.

    #168267

    In reply to: WP Debug Error Message

    Pascal Casier
    Moderator

    Hi Ben,

    It seems to be a known issue, but not bbPress related. Bug tickets have already been opened and closed for this because the issue is coming from other plugins.

    You can read more here: https://codex.bbpress.org/bbp_setup_current_user/was-called-incorrectly/

    But please let this not refrain you in posting here the issues you see or open a trac debug ticket yourself. It’s better to have it twice then not at all.

    Pascal.

    #168252
    Toni
    Participant

    I am trying to figure this out. I will get it eventually.

    Theme Compatibility

    Thanks again!
    Cheers!

    #168251
    Toni
    Participant

    The “Forums” page lists all the topics – not the Forums, is that normal?
    http://toni-esl.com/eslforum/write/

    I can create a page and use a shortcode to list Forums.

    Thank you so much for your help!

    #168234

    In reply to: Forum avatar

    Robkk
    Moderator

    i can’t see and option in buddypress to upload anything.

    See if this guide helps.

    Profile → Change Profile Photo

    On this post is a simple way to add a ranking based on post count.

    User ranking system?

    Where it says
    echo '<div class="all-stars"><i class="svg-icon one-star"></i></div>'

    That is where you can add your images like this.

    echo '<div class="all-stars"><img src="image source"/></div>'

    Make sure they are different for each post count specified in the snippet.

    You may need different CSS than what was mentioned in the post though.

    #168232
    lissyhunnybee
    Participant

    I think because I had two separate functions both using bbp_before_get_breadcrumb_parse_args one cancelled out the other so changing that section worked. I prefer having it all in one though. Thanx so much for all your help πŸ™‚

    #168231
    Robkk
    Moderator

    Hmm that is weird adding the breadcrumb like this worked for me. Either function you use is fine though.

    function rkk_breadcrumb_text() {
        $args['before']  = '<div class="bbp-breadcrumb"><p><span class="bbp-breadcrumb-text">You Are Here: </span>';
        $args['sep'] = ' / ';
        return $args;
    }
    add_filter('bbp_before_get_breadcrumb_parse_args', 'rkk_breadcrumb_text');
    #168230
    lissyhunnybee
    Participant

    Never mind, found my answer LOL just had to change one little bit πŸ™‚

    //* Change BBPress Breadcrumb Seperator
    function filter_bbPress_breadcrumb_separator() {
    $sep = ' / ';
    return $sep;
    }
    
    add_filter('bbp_breadcrumb_separator', 'filter_bbPress_breadcrumb_separator');
    #168229
    lissyhunnybee
    Participant

    Hmmm, that code works but when I add it the code I added to change the seperator stops working. And if I add the function for the seperator after the code you gave me that one then stops working lol

    Here is the function I am using for the seperator, maybe they need to be combined somehow to work properly together?

    //* Change BBPress Breadcrumb Seperator
    function custom_bbp_breadcrumb() {
        $args['sep'] = ' / ';
        return $args;
    }
    
    add_filter('bbp_before_get_breadcrumb_parse_args', 'custom_bbp_breadcrumb' );
    #168228
    Robkk
    Moderator

    Something like this might work.

    Add this php code snippet to your child themes functions.php or add it in a functionality plugin.

    function rkk_display_moderator_label() {
        $reply_id    = bbp_get_reply_id();
        $role        = bbp_get_user_display_role( bbp_get_reply_author_id( $reply_id ) );
    	
        if( $role == 'Moderator') {
            echo'<div class="bbp-mod-label">Forum Moderator</div>';
        }
    }
    
    add_action( 'bbp_theme_before_reply_content', 'rkk_display_moderator_label' );
Viewing 25 results - 7,501 through 7,525 (of 32,569 total)
Skip to toolbar