Quantcast
Channel: bbPress.org » All Posts
Viewing all 3559 articles
Browse latest View live

Topic tag conditional for specific word

$
0
0

How do we do a basic conditional for a specific term from our list of topic tags?

I’ve tried all these different methods but not worked it out (annoyingly I have had this working before but don’t have access to my old files and cannot remember how I did it! D’oh!)

has_term
has_term( ‘myterm’, ‘topic_tag’ )
has_term( ‘myterm’, ‘bbp_topic_tag’ )
bbp_is_topic_tag
get_topic_tag_list($topic->ID, ‘topic_tag’, true)
get_post_meta($topic->ID, ‘topic_tag’, true)

So rather than spend another hour trying different things can someone give me a hint please? Thanks 🙂


Move User Details to Custom Sidebar

$
0
0

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?

Reply To: Move User Details to Custom Sidebar

$
0
0

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?

Reply To: Move User Details to Custom Sidebar

$
0
0

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.

How to disable text editor?

$
0
0

I need to enable visual editor and disable the text editor. Currently, I have both visual and text editors.

Reply To: How to disable text editor?

$
0
0

possibly

div#wp-bbp_reply_content-editor-tools {
    display: none;
}

in the custom CSS section of your theme

Reply To: How to disable text editor?

$
0
0

The visual editor is hidden. I need the text editor to be hidden.

Reply To: How to disable text editor?

$
0
0

I don’t know what happened, but it is working now. Thanks Robin


Reply To: How to disable text editor?

$
0
0

I don’t know what happened

it’s a computer – we’ll never understand them !!

great – glad you are fixed !!

Can’t find where to customize element

$
0
0

Hey there guys… there is a specific element on my bbpress forum that I need to customise and I’ve been through the style crib, the bbpress style sheet, and even the bbpress style pack plugin and can’t sem to find in the code anywhere that will help me customize this element. I have a screen shot but now I realize I can’t use screen shots here. The element is the Reply To: element. I know how to make it non transparent… but I can’t figure out where to set that text color at all. The actual text “Reply To” needs to be a different color so it can be seen. I also think there is a glitch in the boarder as well. Any help would be awesome. Here is a link to my screenshot: http://fjrmbfans.us/wp-content/uploads/2017/08/FORUMscreenshot.jpg you’ll see my issue in the bottom portion. Thanks again for all your help!

Reply To: Can’t find where to customize element

$
0
0

So, you main issues is, you can’t change styles for “Reply To: element.” ??
If this is the issue, you can check their css, and make your custom css and add it into your theme’s css file

Reply To: How to Align Content Text To The Left, not centred?

How do completely disable change email from bbpress form-user-edit

$
0
0

I want to remove/disable totally changing email input value from form-user-edit without using hidden input

<input type="hidden" name="email" id="email" value="<?php bbp_displayed_user_field( 'user_email', 'edit' ); ?>" class="regular-text" tabindex="<?php bbp_tab_index(); ?>" />

I want user only change display name, bio, and password only how to do it?

Reply To: How do completely disable change email from bbpress form-user-edit

$
0
0

you can update your basic information for setting page directly.

I want my bbpress content aligned to left and not center

$
0
0

Good day BBpress I am Eze a new BBpress user. I am using BBpress version 2.5.13 and my site is http://haleze.com
The alignment of my content in BBpress forum is center whereas I want it to be left aligned like regular posts which look attractive.
I will be grateful if you could be if help. Thank you.


“>

Reply To: I want my bbpress content aligned to left and not center

$
0
0

What theme do you use? Most of themes have “Own CSS” option. It usually works when native solutions doesn’t.

Change background color of 1st post

$
0
0

Hello guys,

How can I make the 1st post of each topic (author post) to have a different background color? Exactly like we can found here in official bbpress support forum.

Thanks in advance 🙂

Reply To: I want my bbpress content aligned to left and not center

$
0
0

Thanks for responding. I use Clarina theme from lloris one companion. The theme has a provision for custom CSS

Reply To: I want my bbpress content aligned to left and not center

$
0
0

presume you are fixed as it looks left aligned – if not please give us a link to a specific example and state which element

Viewing all 3559 articles
Browse latest View live


Latest Images