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] Customizing CSS file

5 Posts
4 Users
2 Reactions
3,231 Views
Posts: 19
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
(@zmgma)
Eminent Member
Joined: 6 years ago
[#12460]

Hello!

I have read this documents and it helps a lot.

https://wpforo.com/docs/root/forum-themes/theme-customization/

I have one more suggestion.

Please support customized style.css and colors.css like that layout customization.

If I add those two files under theme file > wpforo > classic, that's how it works.

Thank you.

Best regards,

Youzer


4 Replies
Sofy
Posts: 5774
 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 @zmgma,

As I've already mentioned here: https://wpforo.com/community/how-to-and-troubleshooting-2/can-i-change-colors-css-file/ the CSS files are not included in theme overwriting method. I'm really sorry but there is no way to overwrite colors.css and style.css. The only way is using colors settings options in Dashboard > Forums > Settings > Styles admin page.

You should add the custom CSS codes in the "Custom CSS code" textarea.


Posts: 212
 fawp
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
(@fawp)
Reputable Member
Joined: 7 years ago

Hi @Sofy

 

Over the past few days I have been reading about wpForo style customization and I have come across this thread here.

 

I just want to clarify: you mention here that, at the moment

Posted by: @sofy

CSS files are not included in theme overwriting method. I'm really sorry but there is no way to overwrite colors.css and style.css

yet in this document that mentions theme files I see at the very end of the page:

IMPORTANT: Please don’t use these two files for template style and color customization. These are theme core files and should not be changed. Style should be customized using style.css file.

The last paragraph (in bold) seems to be at odds with the statement above. Is it a matter of amending the documentation in that page, or am I missing something?

 

Many thanks as always,

fawp


2 Replies
Alvina
Moderator
(@alvina)
Joined: 7 years ago

Member
Posts: 1857
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

@fawp,

There is no way to customize those files.

However, if you're familiar with programming and need to make those changes, please put the following code in the current active theme functions.php file. The code provided below allows you to disable the our CSS files and enable the custom files provided by you.

add_action('wp_enqueue_scripts', function(){
wp_deregister_style('wpforo-style');
wp_register_style('wpforo-style', '/YOUR/CUSTOM/STYLE/CSS/STYLE.CSS', false, 'YOUR_STYLE_VERSION' ); wp_deregister_style('wpforo-widgets');
wp_register_style('wpforo-widgets', '/YOUR/CUSTOM/WIDGET/CSS/WIDGETS.CSS', false, 'YOUR_WIDGET_STYLE_VERSION' ); wp_deregister_style('wpforo-dynamic-style');
wp_register_style('wpforo-dynamic-style', '/YOUR/CUSTOM/COLORS/CSS/COLORS.CSS', false, 'YOUR_COLORS_CSS_VERSION' );
});

Please note the red marked code should be your file path and the version of that file to reset the caches if those exist.

But please note if we update the plugin, and add a new feature that has some relation with styles, you'll not have those new features. Then you will need to go to this file, see changes and manually add it on your CSS file. Or after that customization, you should not update the plugin.


 fawp
(@fawp)
Joined: 7 years ago

Reputable Member
Posts: 212
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

Ok, thanks @alvina, I understand.


Share: