Grid Loop Function Disabled, Need to Customize Homepage

Community Forums Forums General Discussion Grid Loop Function Disabled, Need to Customize Homepage

This topic is: not resolved

This topic contains 2 replies, has 2 voices, and was last updated by 2 years, 7 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #33112

    I had previously modified the number of posts displayed, and categories on the homepage my modifying the genesis_grid_loop() function.

    I have read through  in order to limit the posts showing and remove a category, but I don’t seem to be doing it right.

    Can anyone help me to better understand exactly what code goes where in order to redo these modifications to the website?

    Thank you!



    Hey Monique – we’re no Genesis experts but it sounds like you’re dealing with an issue we faced after we upgraded Genesis. Here’s what StudioPress support told us when we asked about it:

    Changes in Genesis 1.9 disabled the ability to make changes to the query using the grid loop function. This is because those changes have been known to cause significant issues.

    Please add this to your functions.php file

    add_action( 'pre_get_posts', 'child_change_home_query' );
    /** Changes the query on the home page*/
    function child_change_home_query( $query ) {
    if( $query->is_main_query() && $query->is_home() ) {
    $query->set( 'posts_per_page', '5' ); //change this value to match the
    posts per page value you wish to show on the home page

    Hope that helps!


    Thanks so much for taking the time to reply.  That absolutely should have worked, but didn’t work for me.  (Neither did the “be_exclude_category_from_blog” function that IS actually listed on Bill Erickson’s site.)

    I deleted the Grid Loop info from home.php and installed Erickson’s plugin:

    That got me “close enough”.  Still not sure what I was doing wrong with the other, but it never returned any changes on my homepage.

    Thanks again,


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

You must be logged in to reply to this topic.