A client have bought a wordpress theme,
And I am developing a child-theme.
I have duplicated the theme folder, renaming the second one -child, trying to follow the best practices.
Till now, I didn't have any problem editing files.
But there is a CSS rule in the style.php that I have to remove and cannot overwrite (left: 0 !important;)
So I would like to remove it from the style.php file of my theme.
In my local environment, it is working perfectly ;
But in production, the file in the browser is never updated, this CSS rule persists... However the file is physically correct, when I edit it with vim in SSH...
When I remove the file, the browser send me a logic 404...
I cannot figure if it comes from any caching (I don't have any caching plugin) ;
Or if it is related to the parent theme...
I have clean the browser caches several times, even tried to open a private navigation window, nothing is working...
Any trick about it ?
Related
Hello Stackowerflow comunity.
I am suffering from the issue which is "Failed To Load Resource" inside wordpress.
When I close the elementore, all the contents of my website goes break and when i reopen it the website looks great.
In this period what happen is, inside my wordpress directory wp-plugings/upload/elementore/css it contain all css files of elemetore all css files removed auotomaticaly and
when i reopen the elementore all file comes up
What to do ?
I'm assuming your site is breaking down when you deactivate the Elementor plugin. It is common for plugins to remove codes/files generated by them when they're deactivated.
If you need to deactivate the Elementor plugin, yet keep the styling:
What you can do is:
copy all the codes from the css files in wp-content/uploads/elementor/css and paste them in one of the css files in your child theme, or in the theme settings or customizer. (Make sure that all the css code has proper selectors instead of pseudo selectors).
I am wondering why I am not unable to make changes; I already tried several things yet, I don't seem to be able to update the CSS, the following I did already:
There is no Editor, so I am unable to make changes via there.
I am an Administrator and have access to cPanel.
I made changes via ../wp-content/theme/my-theme/style.css and no changes were made.
I empty my cache via plugin and hard reload my Chrome, Firefox and Safari. And no changes were made.
Is there any other solutions? I already found the file which contains all the styles. I would try to add my own class, and see if I am to see if there is any effect.
First thing first, From cPanel you can navigate to your website from the fileManager, use it to make code changes and then save them. You need to clear the cache everytime you make changes (i usually do it from the browser (in chrome, open the dev console, then long press on the refresh button and select the bottom one)
If the changes are still not showing on your site, I think that maybe you are editing the wrong CSS? Is this your theme and are you 100% sure you are editing the right file and, for example, it's not overwritten by a child theme or something else?
If you are using any framework, maybe your property is overwritten by your framework (for example, by bootstrap). To check this, open the console or try to add !important in your CSS file.
Just as an example, when I develop a theme I leave the root style.css with only the theme definitions, and then I create different stylesheets in a different folder. This leads me to the next question: are you enqueue your file correctly? is it even loaded by WordPress?
to check this I usually inspect the code in and search for the id of the file I enqueued from my functions.php.
Unfortunately, without more details, this is the only things I could think of when developing and WordPress theme and make changes from cPanel. Hope some of this can actually help.
Please check following options
Permission of file at ../wp-content/theme/my-theme/style.css.
Grab the css and open in Dream-viewer or sublime is there any css syntax issue.
Also the path of style.css in header is show same by view source.
Or
Even you can use the plugins which allow to add custom css without toching the server check this plugin https://wordpress.org/plugins/simple-custom-css/
A few hours ago I had to change the width and padding on a few divs on this page. I messed around with the developer tool of the browser for a few minutes to see what exactly I want to change. After I connected to the ftp I made the changes I thought were necessary, but I nothing happened. After banging my head for half an hour it turns out that I was making the changes to a cached version of the file. I asked the guy who gave me the task where the css file was, but he couldn't answer me.
So how do I find out where the css file is after I log into the ftp server? In this case there were multiple directories with multiple css files.
As you pointed out, the website uses a plugin to cache CSS files, and these cached files shouldn't be edited directly. It looks like the site is running Wordpress, in which case you'll need to look in the wp-content/themes folder (it will depend on which theme you're running where exactly the CSS file is). It's also often possible to edit the CSS directly from within the wordpress admin panel (Appearance > Editor)
There are two stylesheets for Wordpress theme - Trending:
style.dev.css (30kB) uncompressed ( „dev” means it’s for development).
style.css (23kB) compressed.
Doesn’t matter which file I change in many variations and upload through FTP it doesn’t work! That means layout takes no changes. Edited CSS, uploaded to the server but no change is taken.
Tried out many ways –
1.edited „style.dev.css”, loaded it to the server (don’t work), then renamed to „style.css” (still don’t work).
2.after editing „style.dev.css” compressed it and then loaded to the server (don’t work), then renamed to „style.css” (still don’t work).
when both are on server, server chooses the dev version „style.dev.css”, when I delete it, server jumps to „style.css”.
tried to edit one of them and then send to server (there is still no chage in layout).
Please someone give me a hint where the problem could be?
I have no idea where the problem could be, searched for a solution like for 2 days already.
Link to my site on which I'm working
At the moment your site is pointing to
<link rel="stylesheet" href="http://cfs-gometzlaville.fr/cfs/wp-content/themes/trending/style.css" type="text/css" media="all"> for its style, to replace the stylesheet you will need to rename the updated / modifed sheet AFTER you have named the orignal style.css to something like style_orig.css and then change the name of the updated / modifed file to style.css. Once you have done that you will need to reset the cache from any caching plugins that you use. If this still doesn't work clear your browser cache.
EDIT
If i change the style.css in the websites HTML to style.dev.css changes are made.
As an alternative maybe you should look at Child Theme's here as this will be much more manageable for you. All you will have to do is follow the instructions on the link and then copy and paste the css from your dev.css into the child themes css and it will override the parent styles.
The website is currently referencing style.dev.css, which doesn't exist. It could be a problem with some caching plugin.
Read this page
i want to make some changes into my wordpress css file. i downloaded the style.css and other css file via ftp and made all the changes into the codes i wanted to. I uploaded the files and replace it with the other files. I waited for some time to take it affect but nothing happened, i left it and open my site the other day but the things were still same, no changes. I was using the WP Minify cache plugin. I even deleted it and re upload the css files again but still no changes. I tried out so many things but no success.
I than changed the name of the theme main directory via ftp, it help me a bit and made me happy for awhile, all the changes appeared. I again needed some changes in css files but unfortunately again suffering the same process. Please help :(
P.S. No theme is taking the effects of modifications in the css files codes. i tried different themes, but same results. Even if i delete the style.css nothing happened, but when i delete the entire directory of that theme then blank white page appear on my website.
It doesn't sound like you activated the new theme from your administration panel.
http://codex.wordpress.org/Themes#Selecting_the_Active_Theme
When using any cache plugins you should delete its cache when you do any changes to the website. Have you already done that?
Are there any other css files being loaded after style.css that may alter what you are trying to change?
It's generally not a good idea to edit the themes style.css directly b/c when you upgrade that theme you will lose all of your customizations.
Doesn't your theme have some place for custom CSS? Some themes have it in Appearance >> Theme Options, or something of that nature. What theme is it? Do you have a framework, or child themes? More info needed ... but every theme has a spot for custom css; as was mentioned, it's not best practice to make your modifications in the actual main theme stylesheet, due to updates, etc. ... and anything in the custom css section overrides the default theme stylesheet.