Last active
November 14, 2019 21:55
-
-
Save neilgee/2531c67100c1ccfae89d to your computer and use it in GitHub Desktop.
Revisions
-
neilgee revised this gist
May 29, 2016 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -13,7 +13,7 @@ function genesischild_css() { $hero_bg_image = get_theme_mod( 'hero_bg' ); // Assigning it to a variable to keep the markup clean. $css .= ( !empty($hero_bg_image) ) ? sprintf(' .herocontainer { background: url(%s) no-repeat center; background-size: cover; -
neilgee revised this gist
Mar 25, 2016 . 1 changed file with 28 additions and 30 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -6,35 +6,33 @@ */ function genesischild_register_theme_customizer( $wp_customize ) { // Create custom panel. $wp_customize->add_panel( 'featured_images', array( 'priority' => 70, 'theme_supports' => '', 'title' => __( 'Featured Images', 'genesischild' ), 'description' => __( 'Set background images for certain widgets.', 'genesischild' ), ) ); // Add Featured Image for Hero Widget // Add section. $wp_customize->add_section( 'hero_background' , array( 'title' => __( 'Hero Background','genesischild' ), 'panel' => 'featured_images', 'priority' => 20, ) ); // Add setting. $wp_customize->add_setting( 'hero_bg', array( 'default' => get_stylesheet_directory_uri() . '/images/hero-bg.jpg', ) ); // Add control. $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'hero_background_image', array( 'label' => __( 'Add Hero Background Here, the width should be approx 1400px', 'genesischild' ), 'section' => 'hero_background', 'settings' => 'hero_bg', ) ) ); } -
neilgee revised this gist
Mar 25, 2016 . 1 changed file with 0 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -24,7 +24,6 @@ function genesischild_register_theme_customizer( $wp_customize ) { // Add setting $wp_customize->add_setting( 'hero_bg', array( 'default' => get_stylesheet_directory_uri() . '/images/hero-bg.jpg', ) ); -
neilgee revised this gist
Mar 25, 2016 . 2 changed files with 3 additions and 3 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -35,7 +35,7 @@ function genesischild_register_theme_customizer( $wp_customize ) { 'label' => __( 'Add Hero Background Here, the width should be approx 1400px', 'genesischild' ), 'section' => 'hero_background', 'settings' => 'hero_bg', ) ) ); } 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 charactersOriginal file line number Diff line number Diff line change @@ -7,7 +7,7 @@ function genesischild_css() { wp_enqueue_style( 'genesischild', get_stylesheet_directory_uri() . '/style.css' ); $handle = 'genesischild'; // Swap in your CSS Stylesheet ID $css = ''; -
neilgee revised this gist
Mar 25, 2016 . 1 changed file with 13 additions and 12 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -8,32 +8,33 @@ function genesischild_register_theme_customizer( $wp_customize ) { // Create custom panel $wp_customize->add_panel( 'featured_images', array( 'priority' => 70, 'theme_supports' => '', 'title' => __( 'Featured Images', 'genesischild' ), 'description' => __( 'Set background images for certain widgets.', 'genesischild' ), ) ); // Add section $wp_customize->add_section( 'hero_background' , array( 'title' => __('Hero Background','genesischild'), 'panel' => 'featured_images', 'priority' => 20 ) ); // Add setting $wp_customize->add_setting( 'hero_bg', array( 'default' => get_stylesheet_directory_uri() . '/images/hero-bg.jpg', 'description' => __('this is the description', 'genesischild'), ) ); // Add control $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'hero_background_image', array( 'label' => __( 'Add Hero Background Here, the width should be approx 1400px', 'genesischild' ), 'section' => 'hero_background', 'settings' => 'hero_bg', ) ) ); -
neilgee revised this gist
Mar 25, 2016 . 1 changed file with 0 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -15,7 +15,6 @@ function genesischild_register_theme_customizer( $wp_customize ) { ) ); // Add section $wp_customize->add_section( 'hero_background' , array( 'title' => __('Hero Background','genesischild'), -
neilgee revised this gist
Mar 25, 2016 . 1 changed file with 2 additions and 4 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,10 +1,8 @@ <?php add_action( 'widgets_init', 'genesischild_extra_widgets' ); /** * Register new Widget area and position it after the header. */ function genesischild_extra_widgets() { -
neilgee revised this gist
Mar 25, 2016 . 3 changed files with 0 additions and 4 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -3,7 +3,6 @@ add_action( 'customize_register', 'genesischild_register_theme_customizer' ); /* * Register Our Customizer Stuff Here */ function genesischild_register_theme_customizer( $wp_customize ) { 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 charactersOriginal file line number Diff line number Diff line change @@ -3,7 +3,6 @@ add_action( 'wp_enqueue_scripts', 'genesischild_css' ); /** * Output CSS for background image */ function genesischild_css() { wp_enqueue_style( 'genesischild', get_stylesheet_directory_uri() . '/style.css' ); 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 charactersOriginal file line number Diff line number Diff line change @@ -1,8 +1,6 @@ <?php /** * Register and unregister and position all the widgets. */ add_action( 'widgets_init', 'genesischild_extra_widgets' ); /** -
neilgee revised this gist
Mar 25, 2016 . 2 changed files with 69 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,42 @@ <?php add_action( 'customize_register', 'genesischild_register_theme_customizer' ); /* * Register Our Customizer Stuff Here * */ function genesischild_register_theme_customizer( $wp_customize ) { // Create custom panel $wp_customize->add_panel( 'featured_images', array( 'priority' => 70, 'theme_supports' => '', 'title' => __( 'Featured Images', 'genesischild' ), 'description' => __( 'Set background images for certain widgets.', 'genesischild' ), ) ); // Add Featured Image for Hero Widget // Add section $wp_customize->add_section( 'hero_background' , array( 'title' => __('Hero Background','genesischild'), 'panel' => 'featured_images', 'priority' => 20 ) ); // Add setting $wp_customize->add_setting( 'hero_bg', array( 'default' => get_stylesheet_directory_uri() . '/images/hero-bg.jpg', 'description' => __('this is the description', 'genesischild'), ) ); // Add control $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'hero_background_image', array( 'label' => __( 'Add Hero Background Here, the width should be approx 1400px', 'genesischild' ), 'section' => 'hero_background', 'settings' => 'hero_bg', ) ) ); } 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,27 @@ <?php add_action( 'wp_enqueue_scripts', 'genesischild_css' ); /** * Output CSS for background image * */ function genesischild_css() { wp_enqueue_style( 'genesischild', get_stylesheet_directory_uri() . '/style.css' ); $handle = 'genesischild'; $css = ''; $hero_bg_image = get_theme_mod( 'hero_bg' ); // Assigning it to a variable to keep the markup clean. $css = ( $hero_bg_image !== '') ? sprintf(' .herocontainer { background: url(%s) no-repeat center; background-size: cover; } ', $hero_bg_image ) : ''; if ( $css ) { wp_add_inline_style( $handle , $css ); } } -
neilgee revised this gist
Mar 25, 2016 . 1 changed file with 0 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -15,7 +15,6 @@ function genesischild_extra_widgets() { 'name' => __( 'Hero Home Page', 'genesischild' ), 'description' => __( 'This is the Hero Home Page area', 'genesischild' ), ) ); } add_action( 'genesis_after_header','genesischild_hero_widget' ); -
neilgee created this gist
Mar 25, 2016 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,30 @@ <?php /** * Register and unregister and position all the widgets. * * @package genesischild */ add_action( 'widgets_init', 'genesischild_extra_widgets' ); /** * Register new Widget areas and position them. */ function genesischild_extra_widgets() { genesis_register_sidebar( array( 'id' => 'hero', 'name' => __( 'Hero Home Page', 'genesischild' ), 'description' => __( 'This is the Hero Home Page area', 'genesischild' ), ) ); } add_action( 'genesis_after_header','genesischild_hero_widget' ); /** * Position the Hero Area. */ function genesischild_hero_widget() { genesis_widget_area( 'hero', array( 'before' => '<section class="herocontainer"><div class="wrap hero">', 'after' => '</div></section>', )); }