AI Search
Classic Search
 Search Phrase:
 Search Type:
Advanced search options
 Search in Forums:
 Search in date period:

 Sort Search Results by:

AI Assistant
Notifications
Clear all

[Closed] Remove CSS from non wpForo page

4 Posts
2 Users
0 Reactions
2,001 Views
Posts: 2
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@braviking)
New Member
Joined: 5 years ago
[#17311]

Hello,

Wpforo adds the following css files in the header of ALL posts and pages, and not just on wpforo pages:

 

 

How can I remove the css from non wpforo pages?

I did not enable any widgets or addons.

 

Topic Tags
3 Replies
Robert
Posts: 10746
Admin
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@robert)
Support Team
Joined: 3 months ago

Hi @braviking,

These are wpForo widgets CSS files. wpForo widgets can be displayed in any page, not only in forum page. The widget is a site-wide component, so the widget supporting CSS is loaded side-wide as well.


Posts: 2
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@braviking)
New Member
Joined: 5 years ago

thx for explaining.

I will not use wpForo widgets on my site. How can I de-register the style from the head? Whats its handle?

function wp_deregister_style( $handle ) {
    _wp_scripts_maybe_doing_it_wrong( __FUNCTION__, $handle );
 
    wp_styles()->remove( $handle );
}

1 Reply
Robert
Admin
(@robert)
Joined: 3 months ago

Support Team
Posts: 10746
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian

@braviking,

wpForo doesn't have option to deregister them. Here is a good article about that: https://crunchify.com/wordpress-tip-how-to-disable-specific-plugins-stylesheet/

IMPORTANT: The /wpforo/wpf-themes/classic/colors.css file is also used by forum page, so you should not disable it for all pages, it should be kept for the forum page. The forum page could be checked with this function:

if(function_exists('is_wpforo_page') && !is_wpforo_page()) {
    // your deregister css code....
}

Share: