Sticky Header not Assigning to BBpress Forum - Part 2

Hi,

Wondering if there’s been an update on how to fix this issue. We will be launching near the end of this month.

Thanks :wink:
Tina

Hey Tina,

Thanks for posting in!

Regretfully we do not have any ETA yet. We are still on a beta phase for an upcoming release update. This may or may not be included in the release.

For the meantime, you can temporarily resolve your issue using this tip on how to override the header.

Hope this helps.

Hi @RueNel,

I attempted his solution, but I don’t know php. I tried adding the following snippet into my child functions.php:

add_filter(‘cs_match_header_assignment’, ‘custom_search_header’);
function custom_search_header($match) {
if (is_forums()) {
$match = 214; // the post ID for your header
}
return $match;
}

…214 is the post ID for my header; however, I think the “is_forums” caused my forums page to turn white.

Thanks :slight_smile:
T

Hello There,

Your condition is incorrect. Please check out this codex:
https://codex.bbpress.org/bbpress-conditional-tags/

For the rest of WordPress conditional tags, you can check it here:
https://codex.wordpress.org/Conditional_Tags

Hope this helps.

Unfortunately it doesn’t help as I don’t know how to write php, or which condition is correct. Any further help would be much appreciated.

Thanks so much,
T

Hey There,

To check if you are on a bbpress page, you can use the condition is_bbpress() and your code would be like this:

add_filter('cs_match_header_assignment', 'custom_search_header');
function custom_search_header($match) {
	if ( is_bbpress() ) {
		$match = 214; // the post ID for your header
	}
	return $match;
}

Hope this helps.

Thank you @RueNel. I tried it, but the header still didn’t assign on any of my BBPress forum pages…?


Any other ideas that I could try? Thanks so much :slight_smile:

T

Hi there,

The code was intended to assign the header to only one page in the bbPress. Would you please kindly get back to us with the URL/User/Pass of your website dashboard using the Secure Note and give us exactly the name of the Header you want to assign and the pages you want to do so to be able to give you proper code.

Thank you.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.