Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 5,051 through 5,075 (of 32,518 total)
  • Author
    Search Results
  • #185831
    TrustedOrb
    Participant

    Set up WordPress on my Windows PC. When I click on “Forums”, I get the error
    Fatal error: Uncaught Error: [] operator not supported for strings in C:\xampp\htdocs\wordpress\wp-content\plugins\bbpress\includes\forums\functions.php:1800 Stack trace: #0 C:\xampp\htdocs\wordpress\wp-includes\class-wp-hook.php(298): bbp_pre_get_posts_normalize_forum_visibility(Object(WP_Query)) #1 C:\xampp\htdocs\wordpress\wp-includes\class-wp-hook.php(323): WP_Hook->apply_filters('', Array) #2 C:\xampp\htdocs\wordpress\wp-includes\plugin.php(515): WP_Hook->do_action(Array) #3 C:\xampp\htdocs\wordpress\wp-includes\class-wp-query.php(1683): do_action_ref_array('pre_get_posts', Array) #4 C:\xampp\htdocs\wordpress\wp-includes\class-wp-query.php(3248): WP_Query->get_posts() #5 C:\xampp\htdocs\wordpress\wp-includes\class-wp.php(617): WP_Query->query(Array) #6 C:\xampp\htdocs\wordpress\wp-includes\class-wp.php(735): WP->query_posts() #7 C:\xampp\htdocs\wordpress\wp-includes\functions.php(955): WP->main(Array) #8 C:\xampp\htdocs\wordpress\wp-admin\includes\post.php(1072): wp(Array) #9 C:\xampp\htdocs\wordpress\wp-admin\includ in C:\xampp\htdocs\wordpress\wp-content\plugins\bbpress\includes\forums\functions.php on line 1800
    New forums can be created without any errors, but when I click on the URL of the new forum, I get the same error again.

    #185822
    Howdy_McGee
    Participant

    Thanks! I’ve been in the code so much I didn’t realize that BBPress has it’s own role to assign things like Keymaster. That ended up doing the trick.

    #185818

    In reply to: bbPress (Replies)

    Shmoo
    Participant

    Well, if you’re not afraid to dive into the template files you could walk though them and comment-out the parts where the replies get included.

    I this part for example.
    no replies

    But when you start doing this you need to understand how to override bbPress template files by copying them over to your own WordPress theme directory. You can find more about that in the codex.

    It’s just walking through paths and following the hierarchy.

    OF course, back-up and always test this first locally. Never do stuff like this straight on live websites.

    #185814
    Howdy_McGee
    Participant

    So I’m trying to allow Editors to manage forums and forum posts. I was able to set all the capabilities to allow them to manage topics and replies but in the admin panel forum access is still denied and the page is entirely hidden from the admin side.

    I did run across this topic but it’s 3 years old – is this still an issue?

    Here’s what the capabilities look like that have been added:

    [moderate_comments] => 1
    [manage_categories] => 1
    [manage_links] => 1
    [upload_files] => 1
    [unfiltered_html] => 1
    [edit_posts] => 1
    [edit_others_posts] => 1
    [edit_published_posts] => 1
    [publish_posts] => 1
    [edit_pages] => 1
    [read] => 1
    [level_7] => 1
    [level_6] => 1
    [level_5] => 1
    [level_4] => 1
    [level_3] => 1
    [level_2] => 1
    [level_1] => 1
    [level_0] => 1
    [edit_others_pages] => 1
    [edit_published_pages] => 1
    [publish_pages] => 1
    [delete_pages] => 1
    [delete_others_pages] => 1
    [delete_published_pages] => 1
    [delete_posts] => 1
    [delete_others_posts] => 1
    [delete_published_posts] => 1
    [delete_private_posts] => 1
    [edit_private_posts] => 1
    [read_private_posts] => 1
    [delete_private_pages] => 1
    [edit_private_pages] => 1
    [read_private_pages] => 1
    [list_users] => 1
    [create_users] => 1
    [delete_users] => 1
    [edit_users] => 1
    [publish_forums] => 1
    [edit_forums] => 1
    [edit_others_forums] => 1
    [delete_forums] => 1
    [delete_others_forums] => 1
    [read_private_forums] => 1
    [read_hidden_forums] => 1
    [publish_topics] => 1
    [edit_topics] => 1
    [edit_others_topics] => 1
    [delete_topics] => 1
    [delete_others_topics] => 1
    [read_private_topics] => 1
    [publish_replies] => 1
    [edit_replies] => 1
    [edit_others_replies] => 1
    [delete_replies] => 1
    [delete_others_replies] => 1
    [read_private_replies] => 1
    [manage_topic_tags] => 1
    [edit_topic_tags] => 1
    [delete_topic_tags] => 1
    [assign_topic_tags] => 1
    [spectate] => 1
    [participate] => 1
    [moderate] => 1
    [throttle] => 1
    [view_trash] => 1
    [keep_gate] => 1

    As far as I can tell they’re exactly the same as the keymaster ( with some additional capabilities ) so why is the Forums still unaccessible in the admin panel?

    #185812

    In reply to: Profile pic bug?

    hannibalherman
    Participant

    Where can i find the css code and change it?

    Jakob Helmer
    Participant

    this solved the issue for me:
    I blocked out all codes from the custom roles except for this one:

    function add_role_caps_filter( $caps, $role )
    {
        /* Only filter for roles we are interested in! */
        if( $role == 'bbp_professional' )
            $caps = custom_capabilities( $role );
     
        if( $role == 'bbp_member' )
            $caps = custom_capabilities( $role );
     
        return $caps;
    }
    add_filter( 'bbp_get_caps_for_role', 'add_role_caps_filter', 10, 2 );

    and than I was able to assign capabilities to the new roles via the members plugin of Justin Tadlock.

    I’m still wondering why this works for me … but mayby it works for you too … I hope

    #185801
    Robin W
    Moderator

    both those methods should work.

    when you say you are using the shortcode – exactly what have you got on that page?

    #185800
    margley
    Participant

    Hi
    Is it possible to limit the WordPress plugin bbpress to a single forum? I want to only have a single forum on my site, where users can create new topics within that forum. I’d like to remove the Forum List page entirely as well.

    I’ve tried putting the shortcode from this post (Restricting bbpress to a single forum) on my individual forum page, but that didn’t seem to work…

    Please let me know your thoughts!

    #185799
    Robin W
    Moderator

    If you mean like above, then put this into your css

    blockquote::before {
         content: none !important;
        }
    #185797

    Topic: Bug in bbPress

    in forum Installation
    mwheelermindbox
    Participant

    I am using WordPress 4.8 multisite and noticed a bug in bbPress 2.5.12 and 2.5.13 (possibly older versions as well) with PHP 7.1.6.

    Lines 1798-1805 of includes/forum/functions.php is

    
    // Default to public status
    if (empty( $post_stati ) ) {
    	$post_stati[] = bbp_get_public_status_id();
    
    // Split the status string
    } elseif ( is_string( $post_stati ) ) {
    	$post_stati = explode( ',', $post_stati );
    }
    

    For me $post_stati looks to be an empty string so the if is evaluating to true and the next line is failing with this error:

    Fatal error: Uncaught Error: [] operator not supported for strings in /srv/www/tilth.org/current/web/app/plugins/bbpress/includes/forums/functions.php on line 1800

    Changing line 1799 to:

    
    if (is_array( $post_stati) && empty( $post_stati ) ) {
    

    looks to fix the error.

    Perhaps adding a line inside the conditional of

    
    $post_stati = array();
    

    is a better fix.

    bobibrown0
    Participant

    Hi everyone,

    I think the title is clear. Is it possible (with some coding) to display a specific forum category as the index of the forum?

    I tried using shortcodes in content-archive-forum, I wasn’t expecting much, and… I didn’t get much results.

    Any clue?

    #185748
    Robin W
    Moderator

    I’m only a helper on here, and have nothing to do with development of bbpress, so these are just personal comments.

    bbpress’s philosophy has always been to be a light plugin, and allow others to create add-on plugins that have optional functionality.

    The main author JJJ is proud that the plugin is so stable that new releases are not needed regularly.

    A new version 2.6 will when released contain performance improvements and lots of code improvements under the hood, but the only visible addition is per forum moderation.

    Most features asked for are available in add-on plugins.

    Are there any particular things you are after?

    #185742
    Robin W
    Moderator

    try doing the change that @tweichart suggested ie

    on line 1800 of the same file

    the error is still the same and it’s on line 1800. Fixing something on ln 1850 won’t do the trick here I guess, so you’d need to change as initially written ln 1796 from

    $post_stati = $posts_query->get( 'post_status' );
    to
    $post_stati = $posts_query->get( 'post_status' );
    if (!is_array($post_stati)){
        $post_stati = array($post_stati);
    }

    and then report back

    bobibrown0
    Participant

    Also comment the line 42, which is for when you have topics in the forum

    <?php //bbp_get_template_part( 'form', 'topic' ); ?>

    useStrict
    Participant

    I’m also using PHP 7.1. I fixed it by changing line 1800 to cast the value as an array.

    if ( empty( $post_stati ) ) {
                $post_stati = (array) bbp_get_public_status_id();
    #185712
    Tamas Rottenbacher
    Participant

    Hi,

    I created a custom shortcode for the site pages, posts.
    But it’s not working in forum post.

    How can i do?

    My custom shortcode code:

    function custom_shortcode_errorbox( $atts , $content ) {
    	// Attributes
    	$atts = shortcode_atts(
    		array(
    		),
    		$atts,
    		'error'
    	);	
    	$output = '<div class="errorbox"><i class="fa fa-exclamation-triangle" aria-hidden="true"></i> ' . $content . '</div>';
    	return $output;
    }
    add_shortcode( 'error', 'custom_shortcode_errorbox' );
    #185707
    Howdy_McGee
    Participant

    Ok, here’s what I did. If anyone has a better solution post it! What I was ultimately trying to do was combine both the WooCommerce accounts sidebar with the BBPress sidebar. I think the most difficult part / part I’m most unsure about is the bbp user ID which we’ll get to later.

    Unloading a Template

    I used the bbp_get_template_part filter to find and remove the user-details.php template from loading:

    /**
     * Prevent BBPress from loading certain templates
     *
     * @param Array $templates
     *
     * @return Array $templates;
     */
    function prefix_bbp_template_removal( $templates ) {
    
    	if( bbp_is_single_user() && is_array( $templates ) ) {
    		
    		
    		if( false !== ( $key = array_search( 'user-details.php', $templates ) ) ) {
    			unset( $templates[ $key ] );
    		}
    		
    	}
    	
    	return $templates;
    	
    }
    add_filter( 'bbp_get_template_part', 'prefix_bbp_template_removal');

    Loading a Template

    Then I used the bbp_locate_template() function to reload the template where I wanted it.

    bbp_locate_template( array( 'user-details.php' ), true, false );

    User Profile Links

    This is where it gets hairy. For whatever reason, when outside the “User Home”, BBPress doesn’t know which user is displaying so none of the sidebar links would link plus “Edit” and “Subscriptions” were missing. To show the last 2 links I needed to have bbp_is_user_home return true, in my case it was whenever the user was on WooCommerce Accounts pages:

    /**
     * Modify Home Conditional if viewing WooCommerce Account
     *
     * @return Boolean
     */
    function prefix_bbp_user_home( $is_user_home ) {
    	
    	if( function_exists( 'is_account_page' ) && is_account_page() ) {
    		$is_user_home = true;
    	}
    	
    	return $is_user_home;
    	
    }
    add_filter( 'bbp_is_user_home', 'prefix_bbp_user_home' );

    Which now shows the two links at the bottom. The final piece was actually getting the links to work correctly. This is what I’m most unsure about as I’m not sure how BBPress defines which user is displayed. I’m assuming there’s some kind of impersonation feature which makes this more difficult or something I’m not sure so I just return the current user ID:

    /** 
     * Give BBPress a User ID on Woocommerce Accounts
     *
     * @param Integer $bbp_user_id
     *
     * @return Integer $bbp_user_id
     */
    function prefix_bbp_user_id( $bbp_user_id ) {
    	
    	$user_id = get_current_user_id();
    	
    	if( function_exists( 'is_account_page' ) && is_account_page() && empty( $bbp_user_id ) ) {
    		$bbp_user_id = $user_id;
    	}
    	
    	return $bbp_user_id;
    		
    }
    add_filter( 'bbp_get_user_id', 'prefix_bbp_user_id' );

    I’d love to get some clarification on the BBPress user ID, why it doesn’t use the current user outside User Home, and what the best way to go about this is.

    #185700
    Howdy_McGee
    Participant

    So I found how I can go about loading a specific template, either bbp_get_template_part() or bbp_locate_template() should work.

    The only part of this question I’m not sure of is how to unload a specific template / stop it from loading initially. Any suggestions?

    bobibrown0
    Participant

    I’ve been searching for an answer, that I couldn’t find here. It was actually quite easy to find the solution by myself. But just in case someone need do to this too, this is how you do it:

    -> Create a new folder named “bbpress” at the root of your wordpress theme:
    /wp-content/themes/YOURTHEMENAME/bbpress/

    -> Find the file named “content-single-forum.php” located here:
    /wp-content/plugins/bbpress/templates/default/bbpress/content-single-forum.php
    and copy into your newly created folder:
    /wp-content/themes/YOURTHEMENAME/bbpress/content-single-forum.php

    Now bbpress will use this file instead, if your “YOURTHEMENAME” is in use.

    -> Open the file under
    /wp-content/themes/YOURTHEMENAME/bbpress/content-single-forum.php
    Go to line 48, and you should find this:
    <?php bbp_get_template_part( 'form', 'topic' ); ?>
    Comment this line this way:
    <?php //bbp_get_template_part( 'form', 'topic' ); ?>

    And you’re done! Easy and clean!

    Of course you might want to add a button to create a new topic.
    You can do it, following these steps:

    https://bbpress.org/forums/topic/how-to-add-new-topic-button/

    #185677
    Howdy_McGee
    Participant

    Is there a way to unhook the user-details.php and move re-call it in my own custom sidebar? Or is there a function to load the template part in my custom sidebar file?

    #185668
    tweichart
    Participant

    the error is still the same and it’s on line 1800. Fixing something on ln 1850 won’t do the trick here I guess, so you’d need to change as initially written ln 1796 from

    
    $post_stati = $posts_query->get( 'post_status' );
    

    to

    
    $post_stati = $posts_query->get( 'post_status' );
    if (!is_array($post_stati)){
        $post_stati = array($post_stati);
    }
    

    Setting $post_stati to an array through the second parameter of the get method call won’t help here as $post_stati is an empty string.

    #185664
    tweichart
    Participant

    ln 1851 looks like this:

    $meta_query = $posts_query->get( 'meta_query', array() );

    Robin W
    Moderator

    your filter reads

    add_filter( 'bbp_get_breadcrumb',mod_bbp_get_breadcrumb, 98, 2);

    it should read

    add_filter( 'bbp_get_breadcrumb','mod_bbp_get_breadcrumb', 98, 2);

    you need single quotes around the 2nd function

    pandraka
    Participant

    WordPress 4.8
    PHP 7
    bbpress 2.5.12
    buddypress 2.8.2

    I’m using group types on my bbpress/buddypress site. I’ve had to get creative when it comes to breadcrumbs. There was one minor changes to the bbp_get_breadcrumb function that I had to make to make the breadcrumbs work. I copied the function into my functions.php and added a filter. I’m getting an error/notice:
    Notice: Use of undefined constant mod_bbp_get_breadcrumb – assumed ‘mod_bbp_get_breadcrumb’

    The function is doing exactly what I want it to do. but this error is showing up. The functions is originally located in bbpress/includes/common/template.php file

    here’s the code:

    <?php
    function mod_bbp_get_breadcrumb( $args = array() ) {

    // Turn off breadcrumbs
    if ( apply_filters( ‘bbp_no_breadcrumb’, is_front_page() ) )
    return;

    // Define variables
    $front_id = $root_id = 0;
    $ancestors = $crumbs = $tag_data = array();
    $pre_root_text = $pre_front_text = $pre_current_text = ”;
    $pre_include_root = $pre_include_home = $pre_include_current = true;

    /** Home Text *********************************************************/

    // No custom home text
    if ( empty( $args[‘home_text’] ) ) {

    $front_id = get_option( ‘page_on_front’ );

    // Set home text to page title
    if ( !empty( $front_id ) ) {
    $pre_front_text = get_the_title( $front_id );

    // Default to ‘Home’
    } else {
    $pre_front_text = __( ‘Home’, ‘bbpress’ );
    }
    }

    /** Root Text *********************************************************/

    // No custom root text
    if ( empty( $args[‘root_text’] ) ) {
    $page = bbp_get_page_by_path( bbp_get_root_slug() );
    if ( !empty( $page ) ) {
    $root_id = $page->ID;
    }
    $pre_root_text = bbp_get_forum_archive_title();
    }

    /** Includes **********************************************************/

    // Root slug is also the front page
    if ( !empty( $front_id ) && ( $front_id === $root_id ) ) {
    $pre_include_root = false;
    }

    // Don’t show root if viewing forum archive
    if ( bbp_is_forum_archive() ) {
    $pre_include_root = false;
    }

    // Don’t show root if viewing page in place of forum archive
    if ( !empty( $root_id ) && ( ( is_single() || is_page() ) && ( $root_id === get_the_ID() ) ) ) {
    $pre_include_root = false;
    }

    /** Current Text ******************************************************/

    // Search page
    if ( bbp_is_search() ) {
    $pre_current_text = bbp_get_search_title();

    // Forum archive
    } elseif ( bbp_is_forum_archive() ) {
    $pre_current_text = bbp_get_forum_archive_title();

    // Topic archive
    } elseif ( bbp_is_topic_archive() ) {
    $pre_current_text = bbp_get_topic_archive_title();

    // View
    } elseif ( bbp_is_single_view() ) {
    $pre_current_text = bbp_get_view_title();

    // Single Forum
    } elseif ( bbp_is_single_forum() ) {
    $pre_current_text = bbp_get_forum_title();

    // Single Topic
    } elseif ( bbp_is_single_topic() ) {
    $pre_current_text = bbp_get_topic_title();

    // Single Topic
    } elseif ( bbp_is_single_reply() ) {
    $pre_current_text = bbp_get_reply_title();

    // Topic Tag (or theme compat topic tag)
    } elseif ( bbp_is_topic_tag() || ( get_query_var( ‘bbp_topic_tag’ ) && !bbp_is_topic_tag_edit() ) ) {

    // Always include the tag name
    $tag_data[] = bbp_get_topic_tag_name();

    // If capable, include a link to edit the tag
    if ( current_user_can( ‘manage_topic_tags’ ) ) {
    $tag_data[] = ‘‘ . esc_html__( ‘(Edit)’, ‘bbpress’ ) . ‘‘;
    }

    // Implode the results of the tag data
    $pre_current_text = sprintf( __( ‘Topic Tag: %s’, ‘bbpress’ ), implode( ‘ ‘, $tag_data ) );

    // Edit Topic Tag
    } elseif ( bbp_is_topic_tag_edit() ) {
    $pre_current_text = __( ‘Edit’, ‘bbpress’ );

    // Single
    } else {
    $pre_current_text = get_the_title();
    }

    /** Parse Args ********************************************************/

    // Parse args
    $r = bbp_parse_args( $args, array(

    // HTML
    ‘before’ => ‘<div class=”bbp-breadcrumb”><p>’,
    ‘after’ => ‘</p></div>’,

    // Separator
    ‘sep’ => is_rtl() ? __( ‘‹’, ‘bbpress’ ) : __( ‘›’, ‘bbpress’ ),
    ‘pad_sep’ => 1,
    ‘sep_before’ => ‘<span class=”bbp-breadcrumb-sep”>’,
    ‘sep_after’ => ‘</span>’,

    // Crumbs
    ‘crumb_before’ => ”,
    ‘crumb_after’ => ”,

    // Home
    ‘include_home’ => $pre_include_home,
    ‘home_text’ => $pre_front_text,

    // Forum root
    ‘include_root’ => $pre_include_root,
    ‘root_text’ => $pre_root_text,

    // Current
    ‘include_current’ => $pre_include_current,
    ‘current_text’ => $pre_current_text,
    ‘current_before’ => ‘<span class=”bbp-breadcrumb-current”>’,
    ‘current_after’ => ‘</span>’,
    ), ‘get_breadcrumb’ );

    /** Ancestors *********************************************************/

    // Get post ancestors
    if ( is_singular() || bbp_is_forum_edit() || bbp_is_topic_edit() || bbp_is_reply_edit() ) {
    $ancestors = array_reverse( (array) get_post_ancestors( get_the_ID() ) );
    }

    // Do we want to include a link to home?
    if ( !empty( $r[‘include_home’] ) || empty( $r[‘home_text’] ) ) {
    $crumbs[] = ‘‘ . $r[‘home_text’] . ‘‘;
    }

    // Do we want to include a link to the forum root?
    if ( !empty( $r[‘include_root’] ) || empty( $r[‘root_text’] ) ) {

    // Page exists at root slug path, so use its permalink
    $page = bbp_get_page_by_path( bbp_get_root_slug() );
    if ( !empty( $page ) ) {
    $root_url = get_permalink( $page->ID );

    // Use the root slug
    } else {
    $root_url = get_post_type_archive_link( bbp_get_forum_post_type() );
    }

    // Add the breadcrumb
    $crumbs[] = ‘‘ . $r[‘root_text’] . ‘‘;
    }

    // Ancestors exist
    if ( !empty( $ancestors ) ) {

    // Loop through parents
    foreach ( (array) $ancestors as $parent_id ) {

    // Parents
    $parent = get_post( $parent_id );

    // Skip parent if empty or error
    if ( empty( $parent ) || is_wp_error( $parent ) )
    continue;

    // Switch through post_type to ensure correct filters are applied
    switch ( $parent->post_type ) {

    // Forum
    case bbp_get_forum_post_type() :
    // PAA – modified
    //echo ‘forum title’. bbp_get_forum_title( $parent->ID) ;
    $test_title = bbp_get_forum_title( $parent->ID) ;
    if ($test_title == ‘Group Forums’){
    $base_url = bp_get_root_domain();
    $crumbs[] = ‘Groups‘;}
    else
    {$crumbs[] = ‘ID ) ) . ‘” class=”bbp-breadcrumb-forum”>’ . bbp_get_forum_title( $parent->ID ) . ‘‘; };

    break;

    // Topic
    case bbp_get_topic_post_type() :
    $crumbs[] = ‘ID ) ) . ‘” class=”bbp-breadcrumb-topic”>’ . bbp_get_topic_title( $parent->ID ) . ‘‘;
    break;

    // Reply (Note: not in most themes)
    case bbp_get_reply_post_type() :
    $crumbs[] = ‘ID ) ) . ‘” class=”bbp-breadcrumb-reply”>’ . bbp_get_reply_title( $parent->ID ) . ‘‘;
    break;

    // WordPress Post/Page/Other
    default :
    $crumbs[] = ‘ID ) ) . ‘” class=”bbp-breadcrumb-item”>’ . get_the_title( $parent->ID ) . ‘‘;
    break;
    }
    }

    // Edit topic tag
    } elseif ( bbp_is_topic_tag_edit() ) {
    $crumbs[] = ‘‘ . sprintf( __( ‘Topic Tag: %s’, ‘bbpress’ ), bbp_get_topic_tag_name() ) . ‘‘;

    // Search
    } elseif ( bbp_is_search() && bbp_get_search_terms() ) {
    $crumbs[] = ‘‘ . esc_html__( ‘Search’, ‘bbpress’ ) . ‘‘;
    }

    /** Current ***********************************************************/

    // Add current page to breadcrumb
    if ( !empty( $r[‘include_current’] ) || empty( $r[‘current_text’] ) ) {
    $crumbs[] = $r[‘current_before’] . $r[‘current_text’] . $r[‘current_after’];
    }

    /** Separator *********************************************************/

    // Wrap the separator in before/after before padding and filter
    if ( ! empty( $r[‘sep’] ) ) {
    $sep = $r[‘sep_before’] . $r[‘sep’] . $r[‘sep_after’];
    }

    // Pad the separator
    if ( !empty( $r[‘pad_sep’] ) ) {
    if ( function_exists( ‘mb_strlen’ ) ) {
    $sep = str_pad( $sep, mb_strlen( $sep ) + ( (int) $r[‘pad_sep’] * 2 ), ‘ ‘, STR_PAD_BOTH );
    } else {
    $sep = str_pad( $sep, strlen( $sep ) + ( (int) $r[‘pad_sep’] * 2 ), ‘ ‘, STR_PAD_BOTH );
    }
    }

    /** Finish Up *********************************************************/

    // Filter the separator and breadcrumb
    $sep = apply_filters( ‘bbp_breadcrumb_separator’, $sep );
    $crumbs = apply_filters( ‘bbp_breadcrumbs’, $crumbs );

    // Build the trail
    $trail = !empty( $crumbs ) ? ( $r[‘before’] . $r[‘crumb_before’] . implode( $sep . $r[‘crumb_after’] . $r[‘crumb_before’] , $crumbs ) . $r[‘crumb_after’] . $r[‘after’] ) : ”;

    return apply_filters( ‘mod_bbp_get_breadcrumb’, $trail, $crumbs, $r );
    }

    add_filter( ‘bbp_get_breadcrumb’,mod_bbp_get_breadcrumb, 98, 2);
    ?>

    At this point I’m not sure what else to do or if it’s ok to ignore the warning

    #185624

    In reply to: Members only forum

    u_Oi
    Participant

    Hi @dropshot

    You are looking for this code, paste it in functions.php

    //Restrict Topic Content and Replies for No-Registered Users
    function pj_hla_logged_in_topics($have_posts){
    if (!is_user_logged_in()){
    $have_posts = null;
    }
    return $have_posts;
    }
    add_filter('bbp_has_replies', 'pj_hla_logged_in_topics');

    Regards,

Viewing 25 results - 5,051 through 5,075 (of 32,518 total)
Skip to toolbar