Tagged: child theme, CSS
Hello my style.css is not working in my child theme folder. Please help as I have tried everything to make it work.
UPDATE: Got it to work by adding this code to Funtions 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_uri(), array( ‘parent-style’ ) );
}
However I have noticed when I am setting a custom CSS tag within an element if it starts with a number it does not work. If I start with a letter it does. Is this a known issue or something with my setup?
Hi,
Number are not allowed as starting characters in CSS: https://stackoverflow.com/questions/448981/which-characters-are-valid-in-css-class-names-selectors, so it’s not a know issue.
Best regards,
Rikard