How To Add Additional Style Sheets to Child Theme
-
Hi
I’ve successfully setup a child theme from a premium theme I bought from athemes.com called Sydney Pro. I now want to add some additional style sheets to the child theme itself but I can’t seem to get them to work. Ideally I would like any additional style sheets added to the child theme to take higher priority than the child theme’s style sheet.
Below is the child theme’s function.php
<?php function child_theme_styles() { $parent_style = 'sydney-pro-ii'; // This is 'Sydney Pro IItwentyfifteen-style' for the Twenty Fifteen theme. 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 )); } function extra_stlyes() { wp_enqueue_style( 'tom-style', get_stylesheet_directory_uri() . '/Extra_1.css', array( $parent_style, 'child_style' )); //Extra CSS } add_action( 'wp_enqueue_scripts', 'child_theme_styles', 'extra_styles' ); ?>
Hope someone can shed some light on this please.
Many thanks
Will
The page I need help with: [log in to see the link]
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘How To Add Additional Style Sheets to Child Theme’ is closed to new replies.