• 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

Ads in grid style

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 › Ads in grid style

This topic is: resolved

Tagged: genesis, Google Ads, grid, grid style, gryd style, Metro Pro

  • This topic has 4 replies, 2 voices, and was last updated 12 years ago by viorelepuran.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • March 8, 2014 at 3:32 pm #93965
    viorelepuran
    Member

    Hello guys,
    This is a repost of my issue.
    Brad Dalton did an amazing job helping me, but i could not fix the problem.
    So i am reposting with more detailes:

    I am using a child theme with genesis, and i created a category.php to display post in grid layout.
    So now, my post are beeing displayed on 2 columns.
    Now i want to add a adsense ad after the first 6 posts.
    So it needs to be 6 posts, and after those 6 posts, a area as width as the 2 column post, containing the AD.

    Here is the front-page.php and functions.php

    March 9, 2014 at 1:50 am #94014
    Brad Dalton
    Participant

    Its interesting that you couldn't get this to work because i tested it locally and it worked perfectly for me.

    Tested it again and it works fine.

    widget

    Why have you added PHP for the grid?

    Did you do that to create a 2 column loop of posts?

    This is what you can use for a grid loop

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

    Tutorials for StudioPress Themes.

    March 9, 2014 at 2:30 am #94016
    viorelepuran
    Member

    Hy Brad, yes i used that to create the 2 columns grid, and not i can`t go back and change it.
    I tried your suggestions, but i had no result.
    Would it be okwith you if i gave you acess to wp-admin and ftp, so you can try it on my site?
    Maybe i am missing something or i am doing something wrong when i am doing it.
    Thank you again for your help!

    March 9, 2014 at 4:10 am #94020
    Brad Dalton
    Participant

    Sorry but can't do that as its a service i only offer paying clients.


    Tutorials for StudioPress Themes.

    March 17, 2014 at 2:55 am #95258
    viorelepuran
    Member

    Hello, above line 25, i added this code <?php if($j == 6) { echo do_shortcode('[do_widget id=text-21]');} ?>
    I am using Amr Short code widget to pull info from dashoard->widgets.
    That code worked for me .
    Thank you Brad for your help, you are a great guy!

  • Author
    Posts
Viewing 5 posts - 1 through 5 (of 5 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