Forum Replies Created
-
AuthorPosts
-
August 15, 2013 at 2:29 pm in reply to: Eleven40 theme: How to set a different loop for the homeopage? #56649
Holli
MemberThat should limit it to your home page if you haven't changed any settings in the theme. If you send me the link to your site, I can take a quick look at it.
August 14, 2013 at 9:08 pm in reply to: Eleven40 theme: How to set a different loop for the homeopage? #56448Holli
MemberLooks like it's changed for 2.0. Sorry about that. You can add this to the bottom of your functions.php file in your theme, and it should work. It will only the limit the posts to 5 on the home page.
//* Change the number of posts showing in the grid on the homepage add_action( 'pre_get_posts', 'eleven40_change_num_posts_in_grid' ); function eleven40_change_num_posts_in_grid( $query ) { global $wp_the_query; if( $query->is_main_query() && is_home() ) { $query->set( 'posts_per_page', '5' ); } }
Holli
MemberWell Brad, I don't know what was going on. Maybe something was being cached somewhere or something, but now just adding the unregister_sidebar to header_right in the functions file seems to be working. It definitely wasn't last night. I'd like to add a lot more colorful language here, but I'll keep this G-rated. 🙂 Thanks again for your help Brad!
August 14, 2013 at 11:07 am in reply to: Eleven40 theme: How to set a different loop for the homeopage? #56344Holli
MemberI think you're saying you want to limit the number of posts to 5 on the home page. If that's correct, then go into the home.php file in your child theme and add the posts_per_page argument to the existing grid loop array like below:
function eleven40_grid_loop_helper() { if ( function_exists( 'genesis_grid_loop' ) ) { genesis_grid_loop( array( 'features' => 1, 'feature_image_size' => 0, 'feature_image_class' => 'alignleft post-image', 'feature_content_limit' => 0, 'grid_image_size' => 'grid-featured', 'grid_image_class' => 'grid-featured', 'grid_content_limit' => 250, 'posts_per_page' => 5, 'more' => __( '[Continue reading]', 'eleven40' ), ) ); } else { genesis_standard_loop(); } }
Holli
MemberHi Brad. Thanks for trying to help. However, that doesn't work, That's the problem. It also doesn't work when you unregister it with a priority of 11. Nothing works. The has_action for genesis_header_right still returns true.
Holli
MemberI'm not sure what color bar you're talking about? I'm also not sure what CSS selector you're saying you tried adding max-width and overflow to? If you're wanting to make the black textured bar at the very top of the page another color, you just need to change the background to the .site-header selector like so:
.site-header { background: #f00; /* red */ }
Hopefully, that's the bar you're talking about! 🙂
Holli
MemberYou've got a class applied to the image in the sidebar of alignnone which has a margin of 25px on the bottom. You can add this line of code at the bottom of your CSS to target JUST that image in the sidebar:
#sidebar-alt img.alignnone {
margin: 0;
}I tested it in firebug, and that fixed it.
-
AuthorPosts