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

 Sort Search Results by:

Filter by custom fields

Topic prefix

AI Assistant
Notifications
Clear all

[Solved] Custom Forum CSS bleeds onto non-forum pages

3 Posts
2 Users
0 Reactions
3,033 Views
SiteBastion
Posts: 41
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
(@sitebastion)
Trusted Member
Joined: 5 years ago
[#19133]

I have noticed that the WPForo custom CSS is showing up on regular non forums pages.

I wrote a custom bit of CSS to hide out table of contents plugin within the forums but it ended up being included in the color.css file and then being applied site wide. So it turned off our TOC plugin site wide.

Is this by design?
Is there a way to limit the WPForo CSS to just the forum pages?

I already have quite a bit of CSS loading and I don't really need to add the rather LARGE WPForo CSS file to my non-forum pages.

Thanks for looking into this,

Kim

 

Here is the CSS I loaded into the custom CSS box in the forum "Style" tab:

#wpforo #wpforo-wrap {
   font-size: 13px; width: 100%; padding:10px 0; margin:0px;
}
.ez-toc-title-container {
   display: none;
}

Here you can see the TOC plugin in effect.

https://www.rvtravel.com/rv-travel-newsletter-issue-1025/

When this CSS was loaded it turned the dropdown into a small gray square with a 1px border. On the forum pages it hid the TOC completely.

The page I need help with
wpForo Version
1.9.9
WordPress Version
5.8.1

2 Replies
Chris
Posts: 3610
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
(@chris)
Famed Member
Joined: 5 years ago

Hi @sitebastion,

If you want to make changes on wpForo using custom CSS, always add the below CSS before the path

#wpforo #wpforo-wrap

This means that the CSS code will work only on wpForo

 


SiteBastion
Posts: 41
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
(@sitebastion)
Trusted Member
Joined: 5 years ago

Oops, Forgot to add that to the second line of CSS, what a dope I am!


Share: