• 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

Add to Homepage latest posts? ?

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 › Add to Homepage latest posts? ?

This topic is: resolved

Tagged: custom, default, home, homepage, post, posts, section

  • This topic has 3 replies, 2 voices, and was last updated 5 years, 7 months ago by Matus.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • August 1, 2017 at 3:12 am #209808
    Matus
    Member

    Hello everybody.

    I'd like to customize home page.
    I created so far page I'd like to have as my homepage and add some content to it with default WP editor.
    I've set page as homepage in WordPress Reading settings.

    This is obviously all you need to do to have custom homepage.
    But I can't figure out next question.

    How to output on homepage below content latest two posts?

    The finished homepage should look like:

    • Default section - content I wrote in WP editor
    • Custom section - latest 2 posts

    I'm using default Genesis Framework theme.

    August 1, 2017 at 6:28 am #209813
    Victor Font
    Moderator

    There is no default Genesis Framework theme. The Genesis Framework should never be used as a theme. You should use it with a child theme. The Genesis Sample theme is available for free.

    Using a static home page, which is what you are doing, won't allow you to add posts to a home page. The static home page is of itself a type of post. Just to display the page, the WordPress loop has already run. This is the way WordPress works.

    To display posts and static content you have to create a page template, add your static content to it, then run the genesis() function to initialize the framework and display your posts content. Most Genesis themes come with a front-page template that uses widgets and can display posts.

    Just from your question, it sounds like you might need some training in how WordPress and the Genesis Framework work together. I suggest visiting https://knowthecode.io to learn more.


    Regards,

    Victor
    https://victorfont.com/
    Call us toll free: 844-VIC-FONT (842-3668)
    Have you requested your free website audit yet?

    August 1, 2017 at 6:56 am #209822
    Matus
    Member

    Thanks for the tip.
    I'm using Genesis Sample theme. I just thought Genesis Framework is the name for child theme.

    August 1, 2017 at 10:49 am #209836
    Matus
    Member

    I figured out my problem.

    I created in my Genesis child theme file named 'front-page.php'.
    I add there PHP scripts I wanted to (full-width, custom text...).
    Finally this is the script which display only 2 latest posts on homepage:
    ?><?php query_posts('posts_per_page=2'); ?><?php

    Also I set in WP reading settings 'Display latest posts' in homepage.

    Little tip: add at the very bottom of the 'front-page.php' script, which actually show posts:
    genesis();

  • Author
    Posts
Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Add to Homepage latest posts? ?’ 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

© 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