Creating Your Own Genesis Child Themes
File Structure 1. Development area and create a new folder under themes. 2. You’ll want to copy the style.css and the functions.php
Stylesheet 1. Theme name: The name of the child theme goes here. 2. Theme URI: This is a site where they can view a demo or find. 3. Description: Describe your child theme and it’s qualities. 4. Author: Your name to give yourself credit.
Importing CSS A good way of doing so is to enqueue in your functions.php file using the following script:
add_action( 'wp_enqueue_scripts', 'my_child_theme_scripts' ); function my_child_theme_scripts() { wp_enqueue_style( 'parent-theme-css', get_template_directory_uri() . '/style.css' ); }
Functions.php <?php //* this will bring in the Genesis Parent files needed: include_once( get_template_directory() . '/lib/init.php' );
//* We tell the name of our child theme define( 'Child_Theme_Name', __( 'Genesis Child', 'genesischild' ) ); //* We tell the web address of our child theme (More info & demo) define( 'Child_Theme_Url', 'http://gsquaredstudios.com' ); //* We tell the version of our child theme define( 'Child_Theme_Version', '1.0' );
//* Add HTML5 markup structure from Genesis add_theme_support( 'html5' );
//* Add HTML5 responsive recognition add_theme_support( 'genesis-responsive-viewport' );
Hooks & Filters The hook is chunk of code that we call to in our functions. Genesis that we â&#x20AC;&#x2DC;hookâ&#x20AC;&#x2122; into, which is where the name comes from.
function the_excerpt_length( $length ) { $length = '25'; return $length; } add_filter( 'excerpt_length', 'the_excerpt_length' );
Contact Us Fiverr: https://uk.fiverr.com/parvinraina Facebook: https://www.fb.com/genesisshowcase/
THANKS FOR WATCHING