• 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

Teasers – full width?

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 › Teasers – full width?

This topic is: not resolved

Tagged: grid loop, teasers

  • This topic has 2 replies, 2 voices, and was last updated 12 years, 10 months ago by JoggingLife.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • September 7, 2013 at 5:23 pm #61284
    JoggingLife
    Member

    Hi all,

    I want to add a 320 x 50 mobile banner to my website, situated before my post titles.

    I found a way to do this, but it added the banner to the grid loop, so the ad shows on the homepage and archives rather than just in the post itself. You can see this on my site, here: http://thegoldfishtank.com

    I wouldn't mind this - in fact it could be a good thing - but because the teasers are two columns, two banners show next to each other and overlap slightly.

    So, could anyone tell me how to:

    a) Make the teasers full width so that there's only one per row in the middle column?

    or

    b) Make the ad only show once, in the first post of the grid loop?

    or

    c) Add the ad before my post title, but not have it show in the grid loop?

    As you can probably tell, coding/HTML isn't my strong point so I'd really appreciate any fairly straightforward and clear instructions!

    Thanks in advance.
    Adam

    http://thegoldfishtank.com
    September 7, 2013 at 10:22 pm #61305
    Brad Dalton
    Participant

    Try this:

    Please copy the code from the view raw link and paste it at the end of your child themes functions.php file using a text editor like Notepad++

    Or you can display the mobile banner using the genesis_before_loop hook.

    Another option is to use a conditional tag for mobiles if you only want your banner to displays when viewed on mobile devices.

    You can set the the posts per page to the same number as the features in your home.php file:

    remove_action( 'genesis_loop', 'genesis_do_loop' );
    add_action( 'genesis_loop', 'child_grid_loop_helper', 55 );
    /** Add support for Genesis Grid Loop **/
    function child_grid_loop_helper() {
    
    	if ( function_exists( 'genesis_grid_loop' ) ) {
    	
    		genesis_grid_loop( array(
    			'features' => 5,
    			'feature_image_size' => 250,
    			'feature_image_class' => 'alignleft post-image',
    			'feature_content_limit' => 1000,
    			'grid_image_size' => 'grid',
    			'grid_image_class' => 'alignleft post-image',
    			'grid_content_limit' => 220,
    			'more' => __( 'Continue reading...', 'genesis' ),
    			'posts_per_page' => 5,
    		) );
    
    	}
    
    	else {
    		genesis_standard_loop();
    	}
    
    }
    
    genesis();
    

    Or you can remove the grid loop and only use the standard loop.


    Tutorials for StudioPress Themes.

    September 8, 2013 at 5:38 am #61328
    JoggingLife
    Member

    Awesome, thanks a lot for this! I tried both of the first two options and have gone with the genesis before loop hook for now.

    Thanks again for taking the time to help.

    Adam

  • Author
    Posts
Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘Design Tips and Tricks’ is closed to new topics and replies.

CTA

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

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2026 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