Skip to:
Content
Pages
Categories
Search
Top
Bottom

Loading the bbpress Stylesheet on bbpress only

  • 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

Viewing 3 replies - 1 through 3 (of 3 total)

  • John James Jacoby
    Keymaster

    @johnjamesjacoby

    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.

    Hey John,

    thanks for your quick reply.

    Hello John, that sounds like a good plan.

    I’ll give it a try, thanks!

    Hey John,

    sorry to re-open this thread.

    i just found something interesting, the »tags« page (ie: https://bbpress.org/forums/tags/stylesheet) is the only one which doesn’t recognize the is_bbpress() check.

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
Skip to toolbar