• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

How to add place for wide google ad in Lifestyle theme?

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › How to add place for wide google ad in Lifestyle theme?

This topic is: resolved

Tagged: add widget area, lifestyle theme

  • This topic has 3 replies, 2 voices, and was last updated 8 years, 11 months ago by JanHoek.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • June 17, 2014 at 3:04 am #110143
    srousseu
    Member

    Hi everyone and thanks in advance for your help.

    I have the Lifestyle theme and want to add a space for a 728 x 90 Google ad on all my pages just above the footer area. I've been told that I can use genesis simple hooks to add a widget area for this, but I don't know under which section in simple hooks I should add the code and I don't know what the code should be! Any help is much appreciated.

    http://www.healthywealthyexpat.com/
    June 17, 2014 at 3:45 am #110144
    JanHoek
    Participant

    Hi, put this code in your functions.php of your child theme.

    //* Add the sub footer section
    add_action( 'genesis_before_footer', 'jan_sub_footer', 5 );
    function jan_sub_footer() {
    
    	if ( is_active_sidebar( 'sub-footer' ) ) {
    		echo '<div class="sub-footer"><div class="wrap">';
    		
    		   genesis_widget_area( 'sub-footer', array(
    		       'before' => '<div class="sub-footer">',
    		       'after'  => '</div>',
    		   ) );
    	
    		echo '</div><!-- end .wrap --></div><!-- end .sub-footer -->';	
    	}
    	
    }
    
    genesis_register_sidebar( array(
    	'id'          => 'sub-footer',
    	'name'        => __( 'Sub Footer', 'jan' ),
    	'description' => __( 'This is the left section of the sub footer.', 'jan' ),
    ) );

    This put a widget area above your footer. You can see the Sub Footer widget if everything goes as plan.

    Style it as you wish.

    .sub-footer {
    	background-color: #3CB4B4;
    	padding: 40px 0 30px;
    	clear: both;
    	overflow: auto;
    }
    
    .sub-footer .widget {
    	clear: both;
    	overflow: auto;
    	margin: 0 0 20px 0;
    }
    
    .sub-footer .widget-title {
    	color: #2E8986;
    	font-size: 26px;
    	text-transform: none;
    }

    Hope this wil work for you


    Hi, my name is Jan Hoek. Sure, they all say I have a big head, but I like to think it’s way too small for all my ideas.

    June 21, 2014 at 11:51 am #110968
    srousseu
    Member

    Thanks so much, Jan! I now have the new widget area installed and ads running. I really appreciate your help!

    June 21, 2014 at 11:55 am #110970
    JanHoek
    Participant

    you're welcome. Please set te post to solved if you have now further questions. Good luck.


    Hi, my name is Jan Hoek. Sure, they all say I have a big head, but I like to think it’s way too small for all my ideas.

  • Author
    Posts
Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘How to add place for wide google ad in Lifestyle theme?’ is closed to new replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2023 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble