Info
- 4 posts
- 2 voices
- Started 8 months ago by al3xander
- Latest reply from al3xander
- This topic is resolved
Loading the bbpress Stylesheet on bbpress only
-
- Posted 8 months ago #
hey guys,
i'm currently using a wpms installation and bbpress.
i would like to load the stylesheet which bbpress has, only to load on bbpress specific pages, why would it load on on the blogs startpage anyway? :)is there a way to do that?
regards,
alex -
- Posted 8 months ago #
Good question. The main reason it loads all the time is shortcodes. bbPress doesn't have any way to know that the_content contains a shortcode when the head of the page is being processed, so including it all the time is the safest bet for most people.
If you want to dial in your installation, you can wrap the CSS enqueue in a is_bbpress() check. is_bbpress() returns true when WordPress is loading up a bbPress specific page.
-
- Posted 8 months ago #
Hey John,
thanks for your quick reply.
Hello John, that sounds like a good plan.
I'll give it a try, thanks! -
- Posted 8 months ago #
Hey John,
sorry to re-open this thread.
i just found something interesting, the »tags« page (ie: http://bbpress.org/forums/tags/stylesheet) is the only one which doesn't recognize the is_bbpress() check. -
You must log in to post.