Created
December 13, 2016 16:33
-
-
Save jauhari/02de0a079ecfa0f49252fec7cd942df5 to your computer and use it in GitHub Desktop.
Sample Simple Child Theme WordPress
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function my_theme_enqueue_styles() { | |
$parent_style = 'parent-style'; // This is 'twentyfifteen-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 ), | |
wp_get_theme()->get('Version') | |
); | |
} | |
add_action( 'wp_enqueue_scripts', 'my_theme_enqueue_styles' ); | |
// Custom Function to Include | |
function my_favicon_link() { | |
echo '<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" />' . "\n"; | |
} | |
add_action( 'wp_head', 'my_favicon_link' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment