2018 Proper Way To Create A Child Theme
-
Can anyone post how to do this correctly? The forums and web are full of things that just don’t work. I can get the theme to load but none of the style changes are used in the theme.
functions.php
<?php add_action( 'wp_enqueue_scripts', 'enqueue_child_theme_styles', PHP_INT_MAX); function enqueue_child_theme_styles() { wp_enqueue_style( 'parent-style', get_template_directory_uri().'/style.css' ); } ?>
style.css
/* Theme Name: Supreme Innovations Description: The custom theme Supreme Innovations using the parent theme Twenty Seventeen. Author: Supreme innovator Author URI: www.supinv.com Template: twentyseventeen Version: 1 */ .site-branding { padding: 0; } .navigation-top { z-index: 9; } body .site-content-bg { content: ''; width: 110vw; height: 140vh; display: block; background: url('/wp-content/themes/supinv/images/sibg.jpg') center center; background-size: cover; position: fixed; top: 0; z-index: 0; } /* HOME */ body.home .site-content-bg { background: url('/wp-content/themes/supinv/images/sibg.jpg') center right; background-size: cover; } body .site-content { background: rgba(0,0,0,.6); position: relative; z-index: 6; } .colors-dark .site-footer, .site-footer { margin-top: 0; background: rgba(0,0,0,.8); position: relative; z-index: 8; }
Folder
/wp-content/themes/supinv/Test
https://www.supinv.com/wp-content/themes/supinv/images/sibg.jpgThe page I need help with: [log in to see the link]
Viewing 14 replies - 1 through 14 (of 14 total)
Viewing 14 replies - 1 through 14 (of 14 total)
- The topic ‘2018 Proper Way To Create A Child Theme’ is closed to new replies.