• 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

Offset all post by one.

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 › Design Tips and Tricks › Offset all post by one.

This topic is: resolved
  • This topic has 2 replies, 2 voices, and was last updated 11 years, 2 months ago by Brad Dalton.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • June 3, 2014 at 1:59 am #107916
    jourdain
    Member

    Hi there, I would like to offset all my posts by 1 on all category pages and the homepage. I have added a featured widget on all category pages so at the moment each post is displayed twice. This is best seen on my site .

    I did manage to do this using a tutorial I found on-line, however, it also affected the WordPress back-end. I could not see the latest post.

    Any help or pointers on this would be much appriciated.

    Thanks in advance. 🙂

    Jourdain

    http://creativefreaks.co.uk/
    June 3, 2014 at 12:35 pm #107990
    jourdain
    Member

    If any one is interested I sorted this problem with the following code

    //Offset bolg by 1 post
    add_action( 'pre_get_posts','child_change_home_query' );
    function child_change_home_query( $query ) {
        if ( $query->is_main_query() and is_front_page() || is_archive() ) {
            $query->set( 'posts_per_page', '10' );
            $query->set( 'offset', '1' );
        }
    }
    October 3, 2014 at 4:12 am #126650
    Brad Dalton
    Participant

    Jourdain

    Please link to the source of the code http://codex.wordpress.org/Making_Custom_Queries_using_Offset_and_Pagination


    Tutorials for StudioPress Themes.

  • Author
    Posts
Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘Design Tips and Tricks’ 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

© 2025 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