• 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

Specific, Truncated Content in Custom 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 › General Discussion › Specific, Truncated Content in Custom Front Page

This topic is: not resolved

Tagged: content, content archives, custom excerpt, entry-content, read more, the_excerpt

  • This topic has 2 replies, 2 voices, and was last updated 10 years, 3 months ago by jaxweb.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • April 22, 2016 at 7:58 am #184163
    jaxweb
    Participant

    In my custom front page i want to call the truncated content from specific posts. I know the code to call the whole content, I know the code to call the excerpt of an exact post. I don't want to use the excerpt box in the backend, so i either want to use the pull the content prior to the 'read more' tag, or use Genesis 'Content archives > Display: Entry content -> Limit' settings to determine the truncated content i'm pulling.

    April 22, 2016 at 8:40 am #184167
    Christoph
    Member

    Hi,

    the_excerpt() will use the "automatic" excerpt if there is no manual excerpt.
    https://developer.wordpress.org/reference/functions/the_excerpt/


    https://www.christophherr.com | Genesis Customizations | Buy me a coffee

    April 22, 2016 at 11:48 am #184197
    jaxweb
    Participant

    For those who want to know what i did

    Added this to my functions.php

    function custom_excerpt_length( $length ) {
        return 30;
    }
    add_filter( 'excerpt_length', 'custom_excerpt_length', 9 );
    
    function new_excerpt_more($more) {
    	global $post;
    	return '<a href="'. get_permalink($post->ID) . '">Read More</a>';
    }
    add_filter('excerpt_more', 'new_excerpt_more');

    Then added this to where i was adding the excerpt in my front page php

    $id = 14;
    $temp = $post;
    $post = get_post( $id );
    setup_postdata( $post );
    echo the_excerpt();
  • Author
    Posts
Viewing 3 posts - 1 through 3 (of 3 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

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