My child theme style.css file is loading twice. Obviously I would like it to only load once and most importantly I would like it to load last after all of the parent theme css so it overrides without having to use “!important” for every css block, even after I enable merging which I plan to when I am completely done customizing the site.
This is my fuctions.php for loading the parent and child styles:
<?php
add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );
function theme_enqueue_styles() {
wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
wp_enqueue_style( 'child-style',
get_stylesheet_directory_uri() . '/style.css',
array('parent-style')
);
}
Hey milkytech,
I don’t think you need that function, what happens if you remove it altogether? I tried logging in to your site but the login URL gave me a 404 error.
Sorry, this page doesn’t exist.
Please check the URL or go back a page.
404 Error. Page Not Found.
Best regards,
Rikard
My bad. I finally moved the site over to the domain where it will reside permanently. avayoupaint.com. credentials the same. I’ll try removing it altogether but I get the feeling that may only stop it from loading twice. I also need it to load LAST.
I confirmed that code is not needed. It still isn’t the last style loaded but so far that is not an issue. Another question for you…The styles I put in the Quick CSS box on the General Styling tab, what file are they actually stored in on the server?