Community Forums › Forums › Archived Forums › Design Tips and Tricks › Customizing the Standard Loop
Tagged: grid loop, home page widgets
- This topic has 7 replies, 4 voices, and was last updated 12 years, 2 months ago by
willb.
-
AuthorPosts
-
December 9, 2012 at 12:42 pm #4017
willb
MemberI'm trying to customize the home page on a site. I'd like to keep the standard loop (not use grid-loop), but I want one full-length featured post and several posts with excerpts only. I know how to customize the grid-loop just find to get the correct excerpts, number of posts and featured images.
I'm just not that sure about customizing the standard loop seeing is it's not even in the theme home.php file.
I'm using innov8tive child theme.
Thanks
December 11, 2012 at 12:07 am #4419eightcrazy
MemberThe "grid" appearance on this home page does not come from the loop. It comes from featured posts in widget areas on the home page.
December 11, 2012 at 7:17 am #4480willb
MemberDid you look at the link? I am not using the homepage widget structure.
I know this is a more general question and not theme specific. Nick asked me to post it here.
December 11, 2012 at 7:21 pm #4599eightcrazy
MemberYou will need to wright a new home.php to include the loop.
Find info here: http://my.studiopress.com/tutorials/genesis-grid-loop/
December 23, 2012 at 9:35 pm #7239DanielJLewis
MemberI would like to know how to do this, too. But the code on the grid loop page breaks my site when I follow the directions.
December 23, 2012 at 9:55 pm #7241nickthegeek
Memberyou might check out this tutorial I wrote that explains a bit more on how the page templates work and how to make a front page template
December 24, 2012 at 6:50 am #7253DanielJLewis
MemberThanks, Nick. I had already seen that page, but it doesn't help me. I don't want to create a widgetized page, I want to customize the loop: move the picture above the header, use a custom picture size, remove the excerpt, etc.
My issue with the the code on StudioPress's tutorial page is a known bug I've had that I had forgotten about. If I copy the code when I first select it, it pastes fine. But if I copy the code after clicking in the code window, the tabs are weird hidden characters that corrupt the code.
January 6, 2013 at 7:51 pm #10008willb
MemberWe went another direction in this site, but the issue is still bugging me. I'd like to use the grid loop to have 4 featured posts and 4 excerpts on the home page.
I read the tutorial and copied the code into my home.php. Here's what I have:
<code>
<?php
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' => 4,
'feature_image_size' => 0,
'feature_image_class' => 'alignleft post-image',
'feature_content_limit' => 0,
'grid_image_size' => 'grid-thumbnail',
'grid_image_class' => 'alignleft post-image',
'grid_content_limit' => 0,
'more' => __( '[Continue reading...]', 'genesis' ),
'posts_per_page' => 8,
) );
} else {
genesis_standard_loop();
}
}
/** Remove the post meta function for front page only **/
remove_action( 'genesis_after_post_content', 'genesis_post_meta' );
genesis();</code>
It seems like I need to register the grid loop in the functions.php, but nothing says that's necessary and I'm not sure how to do that.
Nick I did look at your post, but it didn't seem to address implementing the grid loop.
-
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.