Ads in grid style

Community Forums Forums Design Tips and Tricks Ads in grid style

This topic is: resolved

This topic contains 4 replies, has 2 voices, and was last updated by  viorelepuran 1 year, 8 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • #93965


    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

    • This topic was modified 1 year, 8 months ago by  viorelepuran.
    • This topic was modified 1 year, 8 months ago by  viorelepuran.


    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.


    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 {



    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!



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



    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!

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.