AI Assistant
Notifications
Clear all

[Closed] Override CSS?

4 Posts
4 Users
0 Reactions
3,764 Views
Posts: 6
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
(@bstein)
Active Member
Joined: 8 years ago
[#5910]

What's the preferred way to override some of the default CSS.  For instance I'd like to add underlining back to the links in the forum.  I've added the CSS into the CSS dialog on the styles page but the CSS file from the wpforo theme still seems to be winning, even after setting the override CSS in the style form to !important.  Is there another option?

Thanks

Ben


3 Replies
Sofy
Posts: 5781
 Sofy
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
(@sofy)
Support Team
Joined: 8 years ago

Hi Ben,

Could you please leave the URL and your CSS code, perhaps your theme CSS has more influence than your custom code.

 


Robert
Posts: 10720
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: 2 months ago

Hi Benjamin,

wpForo theme file overwriting method is only available for PHP files. You can do this with CSS files yet. This is already in our to-do list. We'll add it very soon. At the moment you can change the CSS file in this file:

/wp-content/plugins/wpforo/wpf-includes/wpf-hooks.php red marked part:

if (is_rtl()) {
wp_register_style('wpforo-style-rtl', WPFORO_TEMPLATE_URL . '/style-rtl.css', false, WPFORO_VERSION );
wp_enqueue_style('wpforo-style-rtl');
}
else{
wp_register_style('wpforo-style', WPFORO_TEMPLATE_URL . '/style.css', false, WPFORO_VERSION );
wp_enqueue_style('wpforo-style');
}

The doc: https://codex.wordpress.org/Function_Reference/wp_register_style

 


Posts: 6
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
(@jwpaps)
Active Member
Joined: 7 years ago

Is this implemented yet, other question, if I'm doing the method you are suggestion, how do I know if a upgrade changes that file? Do you expect me to read all changelogs?


Share: