Community Forums › Forums › Archived Forums › Design Tips and Tricks › Balance Theme – change post format on home page
- This topic has 6 replies, 2 voices, and was last updated 10 years, 9 months ago by KathleenCD.
-
AuthorPosts
-
July 16, 2013 at 5:42 pm #51051KathleenCDMember
Is there a (simple) way of changing how multiple posts show up on the home page. Unless the post titles are the same length, having the posts side by side in 2 colums looks very untidy. I'd like to have them show the same as they do on the blog page - one beneath the other. [ http://testsite2nl.com ]
Fingers crossed!
http://testsite2nl.com/
Thanks.July 16, 2013 at 5:54 pm #51053Doak HeggenessMemberYou need to uncomment-out ( /*...*/ ) or delete the 'grid loop' in the home.php ( lines 41 - 66 ). Please use a third party app ( cPanel or SFTP ) so you can 'undo' any errors. DO NOT delete
genesis ();
at the bottom of the page./* 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' => 1, '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' => 5, ) ); } else { genesis_standard_loop(); } } */
Doak Heggeness, WordPress Development | Website
July 16, 2013 at 6:25 pm #51063KathleenCDMemberThanks for the quick repsonse. I just want to clarify - To comment out I add the /* at the beginning as shown above. Is that the only change or should i insert */ somewhere?
Your instructions below show both but I only see /* in the code above.
(You need to uncomment-out ( /*…*/ )Tks
July 16, 2013 at 6:37 pm #51067KathleenCDMemberDisregard... I just saw the */ at the bottom. sorry!!
July 16, 2013 at 6:44 pm #51070KathleenCDMemberI made the change as follows but got a syntax error. Any idea where I went wrong?
}
}
/*
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' => 1,
'feature_image_size' => 'feature',
'feature_image_class' => 'align none post-image',
'feature_content_limit' => 300,
'grid_image_size' => 'grid',
'grid_image_class' => 'align none post-image',
'grid_content_limit' => 0,
'more' => __( 'Continue reading...', 'genesis' ),
'posts_per_page' => 5,
) );}
else {
genesis_standard_loop();
}}
*/genesis();
July 16, 2013 at 7:49 pm #51078Doak HeggenessMemberYes, probably, it is easy to create a syntax error ( a semicolon out of place will create one ). Here is the home.php without the grid loop. Copy & paste it or check it against yours.
<?php add_action( 'genesis_meta', 'balance_home_genesis_meta' ); /** * Add widget support for homepage. * */ function balance_home_genesis_meta() { if ( is_active_sidebar( 'home-featured-left' ) || is_active_sidebar( 'home-featured-right' ) ) { add_action( 'genesis_after_header', 'balance_home_loop_helper' ); } } /** * Display widget content for home featured sections. * */ function balance_home_loop_helper() { if ( is_active_sidebar( 'home-featured-left' ) || is_active_sidebar( 'home-featured-right' ) ) { echo '<div id="home-featured"><div class="wrap clearfix">'; echo '<div class="home-featured-left">'; dynamic_sidebar( 'home-featured-left' ); echo '</div><!-- end .home-featured-left -->'; echo '<div class="home-featured-right">'; dynamic_sidebar( 'home-featured-right' ); echo '</div><!-- end .home-featured-right -->'; echo '</div><!-- end .wrap --></div><!-- end #home-featured -->'; } } genesis();
Doak Heggeness, WordPress Development | Website
July 16, 2013 at 8:02 pm #51086KathleenCDMemberPerfect!!! Thank you so much for helping me with this Doak.
-
AuthorPosts
- The topic ‘Balance Theme – change post format on home page’ is closed to new replies.