• 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

How te exclude first 5 news items from Genesis loop on blog page

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 › How te exclude first 5 news items from Genesis loop on blog page

This topic is: resolved

Tagged: loop

  • This topic has 2 replies, 2 voices, and was last updated 11 years, 3 months ago by jaapstronks.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • April 14, 2014 at 3:04 am #100139
    jaapstronks
    Member

    Hi, I have made a custom blog page template where I use a widget area in the top half of my blog page to display the titles & excerpts of the most recent 5 blog posts using widgets (I did this to have more control on design and formatting). The blog page can be found here, btw. Below this widget area, the blog page starts showing the loop as default.

    In order to avoid displaying duplicate blog post excerpts, I would like to modify my blog page template (or functions.php, whatever would be the best option) to exclude the first 5 items (but only on the first page, obviously, as the aforementioned widget area is only displayed on the first page as well, not on /page/2/, /page/3/ and so on).

    I suspect this would be pretty easy, using a filter or a custom loop function or something, but I haven't been able to figure out how to pull this off exactly. If anyone could help me out with this, that'd be great!

    http://techniekpact.nl/nieuws/
    April 14, 2014 at 5:52 am #100153
    Sridhar Katakam
    Participant

    Try this:

    1) Rename page_blog.php to home.php.

    2) Go to Settings > Reading and set 'Nieuws' as the Posts page. You might want to set a static Page as front page.

    Reference: http://www.billerickson.net/dont-use-genesis-blog-template/

    3) Add the two blocks of code on this page in functions.php.

    Set the value of $offset to 5 in each of the code blocks.


    Genesis Tutorials | Follow me on Twitter

    April 16, 2014 at 8:44 am #100682
    jaapstronks
    Member

    Wow. Thanks! That did the trick. For anyone reading this later on, who would like to pull off something similar: I followed Sridhar's advice. I renamed home.php into homepage.php and added a bit of code to make it into a template. I created a new empty page called 'homepage' and selected the homepage template as its template. I renamed page_blog.php into home.php. In functions.php, I had asigned a couple of widget areas to the blog page; I had to alter the 'if'-statement that selected the page ID of the blog page to an is_home statement which targets the first page of news articles. Well, that. Thank you again, Sridhar!

  • Author
    Posts
Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘How te exclude first 5 news items from Genesis loop on blog page’ is closed to new 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