Forums

Join
bbPress Support ForumsTroubleshootingLoading the bbpress Stylesheet on bbpress only

Info

Loading the bbpress Stylesheet on bbpress only

  1. 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

  2. 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.

  3. Hey John,

    thanks for your quick reply.
    Hello John, that sounds like a good plan.
    I'll give it a try, thanks!

  4. 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.

  5. You must log in to post.