• 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

isplay Posts on Home Page as Custom Excerpts

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 › isplay Posts on Home Page as Custom Excerpts

This topic is: not resolved

Tagged: excerpts, homepage

  • This topic has 1 reply, 2 voices, and was last updated 13 years, 3 months ago by nickthegeek.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • November 16, 2012 at 2:42 pm #355
    GSmith84
    Member

    Hello once again Genesis experts,

    I already use a bit of custom stuff for the home page, but I'm finding I need to clean it up and adjust it.

    I found a potential solution to keep everything very clean using the Advanced Excerpt plugin. But I need to force the posts on the home page to use excerpts.

    Here is 1 part of the custom code I am using, and I couldn't figure out any way to flag the posts as excerpts.


    /** Customize Home Page Posts */
    add_action( 'pre_get_posts', 'custom_home' );
    function custom_home( $query ) {
    if( $query->is_main_query() && $query->is_home() ) {
    $query->set( 'category_name', 'product-list' );
    $query->set( 'posts_per_page', '5' );
    }
    }

    The other code I am using changes the formatting of how the featured image displays. To which I'd like to keep that way if possible or if I need to do something special and setup custom excerpts for each post (which I'd rather not do).


    add_action( 'genesis_before', 'child_home_condition' );
    function child_home_condition() {
    if( is_home() || in_category( array( 'reviews', 'products' ) ) ) {
    remove_action( 'genesis_post_content', 'genesis_do_post_image' );
    add_action( 'genesis_before_post_content', 'custom_home_post', 5 );
    function custom_home_post() {
    $img = genesis_get_image( array( 'format' => 'html', 'size' => 'home', 'attr' => array( 'class' => 'postimageleft post-image' ) ) );
    printf( $img );
    }
    add_action( 'genesis_before_post_content', 'home_post_ratings', 5 );
    function home_post_ratings() {
    echo '';
    do_action('myrpeditors');
    echo '';
    }

    Essentially I'd like to show the posts on the home page within the same format of genesis loop that exist with my changes.

    div post
    entry title
    featured image
    ratingbox
    clear
    entry-content

    And with entry content, show a short excerpt. Any ideas how to go about doing something like that?

    December 10, 2012 at 4:05 pm #4294
    nickthegeek
    Member

    Sorry for teh delay. Did you get this working? If not please share a link to your site. Also, for now could you use a service like pastie.org to share you code. Thanks.

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

© 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