Community Forums › Forums › Archived Forums › Design Tips and Tricks › Help with Genesis Child theme
- This topic has 2 replies, 2 voices, and was last updated 9 years, 11 months ago by BobAsyre2014.
-
AuthorPosts
-
May 19, 2014 at 3:01 pm #105921BobAsyre2014Member
I am having some trouble with placement of a widget using Genesis Framework and Genesis Child Theme "SAMPLE"
I followed the tutorial on this page: http://sridharkatakam.com/adding-horizontal-opt-form-genesis/
but for some reason the Widget ONLY shows up on my BLOG page, which is only a page named blog and not a sub section of the site.I would like the widget, and Opt-in form I plan on using in it, to show up below the header on the main page. I am using a "Static" page for my main page.
Here is the page that the widget is displaying on: http://ultimatebodywrap.com/blog
I just happened to find it while I was clicking through the site checking for where the widget "might be" displaying.I would appreciate any help with this issue.
Here is the functions.php script from the child theme.
Genesis Sample: Theme Functions (functions.php)
<?php
//* Start the engine
include_once( get_template_directory() . '/lib/init.php' );//* Child theme (do not remove)
define( 'CHILD_THEME_NAME', 'Genesis Sample Theme' );
define( 'CHILD_THEME_URL', 'http://www.studiopress.com/' );
define( 'CHILD_THEME_VERSION', '2.0.1' );//* Enqueue Lato Google font
add_action( 'wp_enqueue_scripts', 'genesis_sample_google_fonts' );
function genesis_sample_google_fonts() {
wp_enqueue_style( 'google-font-lato', '//fonts.googleapis.com/css?family=Lato:300,700', array(), CHILD_THEME_VERSION );
}//* Add HTML5 markup structure
add_theme_support( 'html5' );//* Add viewport meta tag for mobile browsers
add_theme_support( 'genesis-responsive-viewport' );//* Add support for custom background
add_theme_support( 'custom-background' );//* Add support for 3-column footer widgets
add_theme_support( 'genesis-footer-widgets', 3 );//* Add support for structural wraps
add_theme_support( 'genesis-structural-wraps', array(
'header',
'site-tagline',
'nav',
'subnav',
'home-featured',
'site-inner',
'footer-widgets',
'footer',
'optin'
) );genesis_register_sidebar( array(
'id' => 'home-optin',
'name' => __( 'Home Optin', 'Genesis Sample Theme' ),
'description' => __( 'This is the home opt-in form section.', 'Genesis Sample Theme' ),
) );add_action( 'genesis_after_header', 'sk_optin_below_header' );
function sk_optin_below_header() {
http://ultimatebodywrap.com/blog
if ( is_home() && is_active_sidebar( 'home-optin' ) ) {
printf( '<div %s>', genesis_attr( 'horizontal-optin' ) );
genesis_structural_wrap( 'optin' );
genesis_widget_area( 'home-optin' );
genesis_structural_wrap( 'optin', 'close' );
echo '</div>';
}
}May 19, 2014 at 5:51 pm #105943CyMemberHello Bob,
The Genesis Sample Child Theme doesn't have a specific home page. It uses a dynamic blog-style home page. In the code that you put in the functions.php file, try changing the sk_optin_below_header function to read 'is_front_page()' instead of 'is_home'.example:
function sk_optin_below_header() {
if ( is_front_page() && is_active_sidebar( 'home-optin' )) {
.... etc ...Let me know if that helps.
Cy...May 20, 2014 at 10:47 am #106033BobAsyre2014MemberCy,
You saved me !!Many thanks......now I just have to tweak the style and I'll be all set.
Thanks again for your help!
Bob A
-
AuthorPosts
- The topic ‘Help with Genesis Child theme’ is closed to new replies.