• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Digital Pro Journal

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › General Discussion › Digital Pro Journal

This topic is: not resolved

Tagged: posts per page, pre_get_posts

  • This topic has 4 replies, 2 voices, and was last updated 7 years, 4 months ago by Brad Dalton.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • February 4, 2016 at 4:19 pm #178338
    Chrisrx
    Member

    Hi

    Im looking to edit the journal on the front page and want to edit the front page only to display 1 post and then the next post will show on the next page link.

    Regards

    Chris

    http://www.roxhar.com
    February 4, 2016 at 11:04 pm #178353
    Brad Dalton
    Participant

    You can use the Reading settings in your WordPress Dashboard and the Genesis > Theme Settings > Content Archives settings

    You can also use code in your functions file

    function limit_post_per_page( $query ) {
        if ( ! is_admin() && $query->is_home() && $query->is_main_query() ) {
            $query->set( 'posts_per_page', '1' );
        }
    }
    add_action( 'pre_get_posts', 'limit_post_per_page' );
    

    Tutorials for StudioPress Themes & WooCommerce.

    February 5, 2016 at 3:38 am #178360
    Chrisrx
    Member

    Hi Brad,

    Does this apply to the Journal on the front page of Digital Pro, as there changing these settings does not seem to effect anything for the The Journal on the front page.

    Thank you for help so far.

    Regards

    Chris

    February 5, 2016 at 3:41 am #178361
    Chrisrx
    Member

    Retract that brad changed the settings in the reading wordpress section and this worked, how hard would it be instead of it going to a completely different page for the next post to scroll along.

    and stay on homepage?

    Regards

    Chris

    February 5, 2016 at 5:29 am #178367
    Brad Dalton
    Participant

    You can add infinite scroll using code or a plugin.

    Please start a new thread for a new question. Thanks.


    Tutorials for StudioPress Themes & WooCommerce.

  • Author
    Posts
Viewing 5 posts - 1 through 5 (of 5 total)
  • The forum ‘General Discussion’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2023 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble