Blog page not showing latest posts

Community Forums Forums General Discussion Blog page not showing latest posts

This topic is: not resolved

This topic contains 17 replies, has 4 voices, and was last updated by  anitac 10 months, 1 week ago.

Viewing 15 posts - 1 through 15 (of 18 total)
  • Author
    Posts
  • #45549

    etocalino
    Participant
    Post count: 8

    Hi There -

    I have the homepage of my site set up to display 5 of the latest posts, but my blog page will only show 1 post. I’ve searched through the forums and I’ve tried to edit the Theme Settings as well as Settings>Reading and nothing has helped. Any help would be appreciated!

     

    http://aspirebytci.com
    #45555

    braddalton
    Participant
    Post count: 7473

    Try changing the settings in your home.php file to 5 posts per page

    genesis_grid_loop( array(
    			'features' => 0,
    			'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,
    

    WordPress Developer & Consultant
    Brad Dalton400+ StudioPress Tutorials & 1200+ Code snippets

    #45557

    etocalino
    Participant
    Post count: 8

    Hi Brad -

    Thanks for the quick response! It already has that setting:

    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,
    ) );

    #45558

    rfmeier
    Participant
    Post count: 518

    Good catch, Brad.

    I was about to answer this. Would grabbing the ‘posts_per_page’ option work too?

    genesis_grid_loop( array(
    	'features' => 0,
    	'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' => get_option( 'posts_per_page' ),
    );

    Ryan Meier – Web Developer @ Solid Interactive
    Twitter

    #45559

    rfmeier
    Participant
    Post count: 518

    What about settings features to the ‘posts_per_page’ value?

    genesis_grid_loop( array(
    	'features' => get_option( 'posts_per_page' ),
    	'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' => get_option( 'posts_per_page' ),
    );

    Ryan Meier – Web Developer @ Solid Interactive
    Twitter

    #45561

    etocalino
    Participant
    Post count: 8

    Thanks Ryan -

    Would I change both the ‘features’ and ‘posts per page’ like in your above answer?

    #45562

    braddalton
    Participant
    Post count: 7473

    Didn’t know you could do that Ryan. Good answer. So does that make the reading settings determine how many posts are displayed per page?

    I think the features number determines how many full width posts are displayed as opposed to posts in a 2 column grid?


    WordPress Developer & Consultant
    Brad Dalton400+ StudioPress Tutorials & 1200+ Code snippets

    #45567

    etocalino
    Participant
    Post count: 8

    I adjusted this line of code and nothing happened:

    ‘posts_per_page’ => get_option( ‘posts_per_page’ ),

    My posts per page is set up as 5 and it still isn’t working:(

    #45568

    etocalino
    Participant
    Post count: 8

    It’s really strange, when I adjust any of the settings like:

    Settings>Reading>Blog pages how at most ___posts

    It only affects the home page and not the blog page.

    #45576

    rfmeier
    Participant
    Post count: 518

    Brad,

    I just confirmed it does pull the ‘posts_per_page’ form the Settings -> Reading setting.

    @etocalino,

    I have the Pretty Theme of test a grid on and I was able to get this to work.

    Are you able to post the code from the file with the genesis_grid_loop() ?


    Ryan Meier – Web Developer @ Solid Interactive
    Twitter

    #45579

    etocalino
    Participant
    Post count: 8

    Here is what I have. And like I said, it affects the home page, but the Blog page will still only show the most recent post:

     

    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’ => get_option( ‘posts_per_page’ ),
    ) );

    }

    else {
    genesis_standard_loop();
    }

     

     

    #45592

    rfmeier
    Participant
    Post count: 518

    Is there also a blog template file?

    The ‘features’ => 1 options will show one regular post and the rest will be grids. That option will need to be increased to show them all. That is why i set ‘features’ => get_option( ‘posts_per_page’ ) before.


    Ryan Meier – Web Developer @ Solid Interactive
    Twitter

    #45609

    etocalino
    Participant
    Post count: 8

    There isn’t a blog page template within the child theme – just Genesis. And the Genesis page_blog.php file doesn’t look like I can edit.

    Thanks for clarifying on the ‘features’. I may use that in the future!

    -Erin

     

     

    #45630

    braddalton
    Participant
    Post count: 7473

    The grid loop is hard coded into the child themes home.php file whereas the blog page template comes from Genesis so you can’t edit it.

    What you need to do is copy the home page grid and use it in a custom blog page template in your child theme if you want to display posts in a grid on your blog page.

    Is this resolved?


    WordPress Developer & Consultant
    Brad Dalton400+ StudioPress Tutorials & 1200+ Code snippets

    #45730

    etocalino
    Participant
    Post count: 8

    Thanks Brad – I’ll try to create the custom blog page template and see if that works. I appreciate your help!

    It seems strange that since there is an actual Blog Page template option when creating a page from the Dashboard, that it wouldn’t be a lot simpler!

Viewing 15 posts - 1 through 15 (of 18 total)

You must be logged in to reply to this topic.