• 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

Put Excerpt On Static Front 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 › Design Tips and Tricks › Put Excerpt On Static Front Page

This topic is: resolved

Tagged: front page, post excerpt

  • This topic has 4 replies, 2 voices, and was last updated 8 years, 4 months ago by TonySan1.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • February 21, 2017 at 2:48 pm #201723
    TonySan1
    Member

    Hi. I'm wishing you all well in this forum today. I am using the Generate Pro Theme and I want to make that page post content show as an excerpt rather that the full page post. Can someone give me the correct php code to put in my functions php to get this to display. I found this code below could someone show me how to edit it so that I will get my excerpt only on the front page of my site? Thank You.
    `add_action('template_redirect', 'sp_custom_post_content');
    function sp_custom_post_content(){
    // only work for home & blog template page
    if( is_home() || is_front_page() || is_page_template('page_blog.php') ){
    remove_action( 'genesis_entry_content', 'genesis_do_post_content' );
    remove_action( 'genesis_post_content', 'genesis_do_post_content' );
    add_action( 'genesis_entry_content', 'genesis_do_custom_post_content' );
    add_action( 'genesis_post_content', 'genesis_do_custom_post_content' );
    }
    }
    function genesis_do_custom_post_content(){
    global $wp_query;
    if( $wp_query->current_post == 0 ){
    // Only first post will display full content
    the_content();
    }else{
    the_excerpt();
    }
    }

    February 21, 2017 at 3:41 pm #201726
    Brad Dalton
    Participant

    You can use the genesis featured posts widget to shows any number of excerpts.


    Tutorials for StudioPress Themes.

    February 21, 2017 at 11:15 pm #201740
    TonySan1
    Member

    What I want to do is instead of showing the full front page content Which is now an article on the page I want to only show an excerpt of that article so that I can put other content below.

    February 22, 2017 at 8:59 am #201769
    Brad Dalton
    Participant

    You can use the Genesis > Theme Settings > Content Archive settings to do this.

    Or

    Create a front-page.php file and add code directly to it to customize your front page content display.


    Tutorials for StudioPress Themes.

    February 22, 2017 at 11:38 am #201775
    TonySan1
    Member

    Brad Thank you for your help and advice. I will try it out. 😉

  • Author
    Posts
Viewing 5 posts - 1 through 5 (of 5 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