Last active
October 23, 2020 18:01
-
-
Save tradesouthwest/eff3c9cd0f54b7ca0f939aa0561300ac to your computer and use it in GitHub Desktop.
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 | |
/** | |
* OnePress Child Theme Functions | |
* And basic parent/child enqueues | |
* | |
*/ | |
/** | |
* Enqueue child theme style | |
*/ | |
add_action( 'wp_enqueue_scripts', 'onepress_child_enqueue_styles', 15 ); | |
function onepress_child_enqueue_styles() | |
{ | |
$bver = time(); | |
wp_enqueue_style( 'onepress-child-style', get_stylesheet_directory_uri() . '/style.css', | |
array(), $bver ); | |
} | |
/* and stylesheet header as follows | |
Theme Name: OnePress Child | |
Theme URI: https://www.famethemes.com | |
Description: OnePress sample child theme | |
Author: FameThemes | |
Author URI: https://www.famethemes.com | |
Template: onepress | |
Version: 1.0.0 | |
Tags: light, dark, two-columns, right-sidebar, responsive-layout, accessibility-ready | |
Text Domain: onepress-child | |
*/ | |
add_action( 'wp_enqueue_scripts', 'anytheme_child_enqueue_child_theme_styles'); | |
function anytheme_child_enqueue_child_theme_styles() { | |
wp_enqueue_style('parent-theme', get_template_directory_uri() .'/style.css'); | |
wp_enqueue_style('child-theme', get_stylesheet_directory_uri() .'/style.css', array('parent-theme')); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment