Announcement

Collapse
No announcement yet.

Genesis/Custom Grid Loop In Custom Hook Box

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Genesis/Custom Grid Loop In Custom Hook Box

    I am having great difficulty in displaying a grid loop in the custom hook boxes. I am looking to apply something like Bill Erickson has in the attached link. I have also been through Mr Katakam's excellent post and can apply his code as the frontpage on the topic. I can make both work but not using the custom hook boxes in Dynamik. I suspect I am doing something very simple, very wrong. I suspect this is a common usage of the hookboxes and yet when I trawled the forum I was unable to find someone with a similar problem.

    I would highly appreciate any examples people have of their code.

    http://www.billerickson.net/a-better...ier-grid-loop/
    http://sridharkatakam.com/posts-colu...epage-dynamik/
    Here's some lessons I learned on customizing the Genesis Grid Loop from my recent site redesign.
    Last edited by foleyvn; 03-31-2014, 08:44 AM. Reason: added tags

  • #2
    I have taken similar code from several sites to modify the genesis loop counter and tried to apply default loop on my site. They all output the widget after each post however and seems to ignore the loop counter. Can anyone give me a hint? Pretty frustrating stuff.
    //* Add new widget Between Posts Area
    genesis_register_sidebar( array(
    'id' => 'between-posts-area',
    'name' => __( 'Between Posts Area', 'basicwp-theme' ),
    'description' => __( 'This widget show between and after few posts.', 'basicwp-theme' ),
    ) );

    //* Add widget area between and after 3 posts
    add_action( 'genesis_after_entry', 'basicwptheme_between_posts_area' );

    function basicwptheme_between_posts_area() {
    global $loop_counter;

    $loop_counter++;

    if( $loop_counter == 3 ) {


    if ( is_active_sidebar( 'between-posts-area' ) ) {
    echo '<div class="between-posts-area widget-area"><div class="wrap">';
    dynamic_sidebar( 'between-posts-area' );
    echo '</div></div><!-- end .top -->';
    }

    $loop_counter = 0;

    }

    }

    Comment

    Working...
    X