Community Forums › Forums › Archived Forums › Design Tips and Tricks › Only Showing One Post on Front Page
Tagged: front page
- This topic has 3 replies, 2 voices, and was last updated 10 years, 6 months ago by Brad Dalton.
-
AuthorPosts
-
May 21, 2014 at 1:32 pm #106201bsw001Member
Hello,
I'm using a custom Genesis theme and have a question about posts appearing on the front page on my site (letsgocu.com).
Currently, only the summary for the latest post appears on the front page. All posts do appear in the blog, however.
My Reading Settings are set to show Your Latest Posts and Blog Pages Show at Most is set to 10 posts.
Can anyone please let me know how to set it so a set number of blog post summaries (five would be ideal) show on the front page at any time?
Thanks!
http://www.letsgocu.com
BrianMay 21, 2014 at 1:40 pm #106204Brad DaltonParticipantDepends on the code in your front-page.php or home.php file and the WordPress Reading settings and the Genesis > Theme Settings.
Otherwise you could try this code in your functions file:
function set_post_limit_home($query) { if ($query->is_home() AND $query->is_main_query()) { $query->set( 'posts_per_page', 5 ); } } add_action('pre_get_posts', 'set_post_limit_home');
May 21, 2014 at 1:45 pm #106206bsw001MemberThanks, Brad. Here is the front-page.php. Is there anything I should be looking for?
<?php /** * This file adds the Home Page to the Magazine Pro Child Theme. * * @author StudioPress * @package Magazine Pro * @subpackage Customizations */ add_action( 'genesis_meta', 'magazine_home_genesis_meta' ); /** * Add widget support for homepage. If no widgets active, display the default loop. * */ function magazine_home_genesis_meta() { if ( is_active_sidebar( 'home-top' ) || is_active_sidebar( 'home-middle' ) || is_active_sidebar( 'home-bottom' ) ) { // Force content-sidebar layout setting add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_content_sidebar' ); // Add magazine-home body class add_filter( 'body_class', 'magazine_body_class' ); // Remove the default Genesis loop remove_action( 'genesis_loop', 'genesis_do_loop' ); // Add homepage widgets add_action( 'genesis_loop', 'magazine_homepage_widgets' ); } } function magazine_body_class( $classes ) { $classes[] = 'magazine-home'; return $classes; } function magazine_homepage_widgets() { genesis_widget_area( 'home-top', array( 'before' => '<div class="home-top widget-area">', 'after' => '</div>', ) ); genesis_widget_area( 'home-middle', array( 'before' => '<div class="home-middle widget-area">', 'after' => '</div>', ) ); genesis_widget_area( 'home-bottom', array( 'before' => '<div class="home-bottom widget-area">', 'after' => '</div>', ) ); } genesis();
May 21, 2014 at 10:37 pm #106257Brad DaltonParticipantYou may have a recent posts or Genesis Featured Posts widget populated in one of your front page widget areas.
You can change the widget settings to display 5 posts using the Genesis Featured Posts widget in the Home Bottom widget area.
-
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.