Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

create child theme in wordpress

add_action( 'wp_enqueue_scripts', 'my_theme_enqueue_styles' );
function my_theme_enqueue_styles() {
    wp_enqueue_style( 'child-style', get_stylesheet_uri(),
        array( 'parenthandle' ), 
        wp_get_theme()->get('Version') // this only works if you have Version in the style header
    );
}
Source by developer.wordpress.org #
 
PREVIOUS NEXT
Tagged: #create #child #theme #wordpress
ADD COMMENT
Topic
Name
6+8 =