Wordpress theme devepment - problem with enqueuing styles - wordpress

this is my first attempt at creating a Wordpress theme so I probably did smething wrong. Anyway something strange happened, some of the styles disappeared (bootstrap) but instead there are some scss files - the url points at the main theme folder, but there are no such files in it. What I want to know is where these styles come from because I actually want to keep tose styles as a base for my theme a screenshot from the console

Related

Do i need to enqueue empty style.css in a custom Wordpress theme?

I know this question sounds simple but i'm unable to figure out, if it's a hard requirement to wp_enqueue_style() the theme's style.css or if it can be left out.
According to documentation it is required that this file exists for Wordpress to recognize the theme, but it's not made clear if it also has to be enqueued.
In my case, I'm using sass to compile my styles into a main.css file, which in turn leaves the style.css empty and technically useless other than being a additional network request made.
Is there any penalty or disadvantage for not enqueueing the style.css in my custom theme?
style.css is necessary for theming - telling WordPress which theme to activate, that being said you do not have to load it on the front end.
It is good practice to enqueue your custom css files so you dont have any conflicts with scripts and styles loaded from plugins.

Failed to load CSS file in elementore inside wordpress

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).

Wordpress child theme files behavior

In a child theme, I have an app.css file containing code modifications. Meanwhile, a theme update was released including a new app.css. In these conditions, if I update the main theme, in browser will be still visible my app.cssignoring the update?
In other words, interesting to know if the overriding proccess is applied to files or in depth between the code lines of the same files? Thanks

How to Implement Sass into Underscores Theme with Bootstrap for Wordpress?

I was able to create a Wordpress theme that I am working on, using my local machine. The issue I am having is incorporating Sass into the Underscores Starter theme, with Twitter Bootstrap's Sass and Wordpress.
I was creating the fixed-top bootstrap navigational bar. I managed to add the proper code to include WP_Walker_Nav in my functions.php file, but this is what my navigation looked like My Bootstrap Nav.
The content is too close to the fixed-top navigation and I wasn't able to control the body tag styles to provide padding of at least 60px from the top.
I was wondering if someone can guide me in the direction on how to incorporate Twitter Bootstrap's Sass and Font-Awesome's Sass into Underscore's Wordpress theme.
I'm struggling with the proper workflow. For my Wordpress default style.css, all I would do is put
#import url("css/style.css");
underneath Wordpress Stylesheet default comments.
I have a folder labeled sass (for all my scss files) and a folder css (for all my compiled css). In my style.scss, I import bootstrap and font-awesome's sass files, and I create a separate scss file (main.scss) to use for my custom styling, but nothing works when I create a variable in my main.scss file.
I would set my style.scss file like this:
#import 'main';
#import 'bootstrap-sass';
#import 'font-awesome';
For example:
$padding10: 10px;
body {
padding-top: ($padding10 * 6)
}
nothing happens when I set up my body tag. Please tell me what I am doing wrong, any help is appreciated. Thank you!
For those wondering about how to do this: the _S Underscores theme added direct support for generating a starter theme with a sass-based architecture last year, which I only recently found out about. If you click the “Advanced Options” link on the Underscores main page, you can then select the _sassify! option and you’re on your way. From there, it should be clear to you how to wire in Bootstrap. The generated sass/styles.scss file in your new theme is a very well organized and documented list of imports, to which you can add Bootstrap however you wish (via Bower, direct download, whatever).
As a side note, you can automate this and make it even easier via wp-cli, which very recently added support for the sassify option to their wp scaffold _s subcommand, which looks something like:
wp-cli scaffold _s my-sassy-theme --theme_name="My Sassy Theme" --sassify
(Note that as of this writing, there hasn’t been a release of wp-cli with that feature; you can use it immediately, however, by installing the wp-cli nightly.)

Wordpress theme is taking no affect?

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.

Resources