Reputation: 10240
I was given a wordpress site running a Fusion Framework and Avada as the child theme. The theme is so powerful, I'v never seen anything like it. However, it is not a good thing for us developers, it takes a lot of control from us. For example, I can't hardly style anything because almost all the css is in the <head>
section wrapped <style>
tags. Making all external css inferior to these styles.
As you know, Wordpress generates its pages differently than a traditional website. There isn't a "real" domain/index.php page that I can go to and alter the <head>
.
I check the Header section in the editor and nothing css related there either.
Is there any way to (I'm assuming a plugin) that I can access the <head>
section and delete the styles there so I can move them to a css file I can control?
I will provide the page url upon request only.
Upvotes: 0
Views: 2671
Reputation: 10240
It appears the css is not directly inserted in the head, but injected dynamically. So after looking closer and some more debugging, I found this function
<?php
ob_start();
include_once get_template_directory() . '/framework/dynamic_css.php';
$dynamic_css = ob_get_contents();
ob_get_clean();
if( is_page('header-2') || is_page('header-3') || is_page('header-4') || is_page('header-5') ) {
$header_demo = true;
} else {
$header_demo = false;
}
//echo $dynamic_css;
?>
Commenting out the echo for this function solves the issue.
!IMPORTANT
Before attempting to comment out the styles output, do a view source and copy and paste these styles from the head and into your separate css so that you don't lose any of the styles produced in the backend. This keeps the styles, but places them in a css that you can control much easier and your load speed will improve as well.
!ALSO IMPORTANT From this point forward any modifications you do to the styles in the backend will not apply, so make all future mods to the css directly into the new css file that was created or the style.css file as well.
Upvotes: 1
Reputation: 365
all the css are generated dynamically based on user's selected options.
to add your own css you should try your framework's backedn options panel.
That css will go before section so it will help to overwrite default css.
let me know if you are not able to do it.
Upvotes: 1