• 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

Genesis Grid is not displaying on custom template

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 › Genesis Grid is not displaying on custom template

This topic is: not resolved

Tagged: genesis grid

  • This topic has 2 replies, 2 voices, and was last updated 12 years, 12 months ago by csbeck.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • March 11, 2013 at 8:38 am #25451
    csbeck
    Member

    I've created a custom child theme for Genesis and I have custom templates that are used to show a grid of posts on main pages on my site - like this page: http://www.beckerstudio.com/portfolio/

    The grid was showing up before I updated WordPress and Genesis as well as setting my PHP to 5.4. I tried resetting PHP to 5.2 but that didn't fix it.

    The code I'm using on that page is: https://gist.github.com/csbeck/5134677
    <?php
    /**
    * Template Name: Portfolio Grid
    * This file displays a Grid within a page.
    */
    add_action( 'genesis_post_content', 'genesis_do_post_content' );

    /**remove_action( 'genesis_loop', 'genesis_do_loop' );**/

    add_action( 'genesis_loop', 'child_grid_loop' );
    function child_grid_loop() {
    $args = array(
    'features' => 2,
    'feature_image_size' => 'grid-feature-image',
    'feature_image_class' => 'alignleft post-image',
    'feature_content_limit' => 500,
    'grid_image_size' => 'grid-thumbnail',
    'grid_image_class' => 'alignleft post-image',
    'grid_content_limit' => 0,
    'loop' => 'custom',
    'more' => __( '[Continue reading...]', 'genesis' ),
    'posts_per_page' => 12,
    );

    if ( genesis_get_custom_field( 'query_args' ) )
    $args['cat'] = genesis_get_custom_field( 'query_args' );

    genesis_grid_loop( $args );
    }

    /** Remove the post meta function for front page only **/
    remove_action( 'genesis_after_post_content', 'genesis_post_meta' );
    Can someone please help with getting my grid to show up again?

    Thanks! Chris

    March 11, 2013 at 8:54 am #25452
    Brian Bourn
    Member

    It's probably due to your posts per page argument. With 1.9 there were a few changes announced with the grid loop and you will now need to get pre_get_posts first. This should get you to what you need to do. http://wpsmith.net/2013/genesis/genesis-grid-loop-in-genesis-1-9/


    Bourn Creative | bourncreative.com | Twitter

    March 13, 2013 at 8:08 am #25841
    csbeck
    Member

    Thanks so much Brian. This was a great help. It took a while to go through these (I guess I'm not as proficient in PHP so it was a little vague as to where all of this code needed to go). I found that I had to add the code to my functions.php. I was then able to set my pages templates to the blog template and it worked (mostly). http://www.beckerstudio.com/portfolio/design/websites/

    I still wasn't able to see the 2 feature items on my particular pages. I did see the 2 features though if I went to an archive page.

    http://www.beckerstudio.com/category/portfolio/portfolio-design/portfolio-websites/

    I wonder if there's a way to get my regular pages set to the page_blog.php template to show this layout. I'm using a custom template on these pages because I wanted to show some introductory content above my portfolio pieces. Perhaps there a better way to do this?

    My page_blog.php template uses this code:

    <?php
    /**
    * WARNING: This file is part of the core Genesis framework. DO NOT edit
    * this file under any circumstances. Please do all modifications
    * in the form of a child theme.
    *
    * Template Name: Blog with Content
    * This file handles blog post listings within a page.
    */
    add_action('genesis_loop', 'genesis_standard_loop', 8);
    genesis();

    I appreciate anyone's additional help or direction if possible. I'm almost there.

    Thanks, Chris!

  • 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