Skip to:
Content
Pages
Categories
Search
Top
Bottom

Reply To: Forums index vs custom page shorturl

@cosmiclove1978

Participant

Hello Regnalf,

I’m happy to report that your fix worked. I had to apply the new class to all the previous CSS code, but it did the trick!!!

This is truly got the time to appreciate firsthand php notions such hook and filters, etc and see them at work. It was neat to be able to fine-tune the bbpress-index class vs bbpress and target one vs all parts of the site. I’m grateful.

Pushing my luck a bit further and modeling your code above and another post I saw elsewhere, I was hoping to get a bit more granular in the way I applied my css to parts of the forum, so I tried this bit of code below to target individual topic pages (or replies?)
but it didn’t work. If it’s not too much to ask, whenever it’s convenient for you or anyone, could you tell me if this code below somewhat does what you just provided me.

function my_topic_class($classes) {
	$classes[] = 'herman-topic-class';
	return $classes;
}
add_filter( 'bbp_get_topic_class','my_topic_class' );

Nowhere, when viewing the topic page or thread did I see the new class ‘herman-topic-class’ in the Inspect Element utility. With your code, the bbpress and bbpress-index appeared.
thanks in advance for all the support.

H

Skip to toolbar