Created
October 4, 2021 16:52
-
-
Save atwellpub/ed634fb8ed35a32a4c14dc0c4dde9892 to your computer and use it in GitHub Desktop.
Very simple child theme functions.php
This file contains 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 | |
class ChildTheme { | |
/** | |
* | |
*/ | |
public function __construct() { | |
$this->load_hooks(); | |
} | |
/** | |
* add action hooks and filters | |
*/ | |
public function load_hooks() { | |
add_action( 'wp_enqueue_scripts', array( __CLASS__ , 'enqueue_styles_scripts' ) ); | |
} | |
/** | |
* enqueue scripts and styles | |
*/ | |
function enqueue_styles_scripts() { | |
/* enqueue parent style */ | |
wp_enqueue_style( 'parent-style', get_template_directory_uri().'/style.css' ); | |
} | |
} | |
new ChildTheme; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment