Created
October 14, 2016 16:07
-
-
Save SpiralOutDotEu/ae3a1d4a04b2580c8ca2512775a3a297 to your computer and use it in GitHub Desktop.
WordPress Child Theme Template
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 | |
/** | |
* | |
* This is the basic you need to enque parent stylesheet. | |
* If you need to overload parent function, check if in parent the function is declared ` if(!(function))` | |
* | |
**/ | |
?> | |
<?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' ); | |
?> |
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
/* | |
Theme Name: Twenty Fifteen Child | |
Theme URI: http://example.com/twenty-fifteen-child/ | |
Description: Twenty Fifteen Child Theme | |
Author: John Doe | |
Author URI: http://example.com | |
Template: twentyfifteen | |
Version: 1.0.0 | |
License: GNU General Public License v2 or later | |
License URI: http://www.gnu.org/licenses/gpl-2.0.html | |
Tags: light, dark, two-columns, right-sidebar, responsive-layout, accessibility-ready | |
Text Domain: twenty-fifteen-child | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment