• 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

Show the _excerpt in related 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 › Show the _excerpt in related posts

This topic is: not resolved

Tagged: related posts, the_excerpt

  • This topic has 3 replies, 2 voices, and was last updated 13 years, 1 month ago by cehwitham.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • February 14, 2013 at 5:49 am #20287
    aaronsummers
    Member

    I followed the tutorial by Nick the Geek here: http://designsbynickthegeek.com/tutorials/related-posts-genesis

    And have been trying to include the excerpt with the post title and image, but am unable to make it work.

    Would any of your brilliant people have any idea or a simple way to achieve this?

    Thanks in advance.

     

    February 21, 2013 at 5:07 pm #22097
    cehwitham
    Participant

    If you've got it outputing ok and just need to add the excerpt then find the following line:

    $related .= '<a href= ... ...';

    and change it to:

    add in get_the_excerpt()

    More information on get_the_excerpt here: http://codex.wordpress.org/Function_Reference/get_the_excerpt


    Twitter: cehwitham Web: cehwitham.com

    February 22, 2013 at 3:35 pm #22293
    aaronsummers
    Member

    Brilliant thanks, obvious now I look at it.

    This was the final code:
    $related .= '<li><a href="' . get_permalink() . '" rel="bookmark" title="Permanent Link to ' . get_the_title() . '">' . $img . get_the_title() . '</a>' . get_the_excerpt() . '</li>';

    February 25, 2013 at 5:24 pm #22788
    cehwitham
    Participant

    Great, glad it's working for you.


    Twitter: cehwitham Web: cehwitham.com

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