• 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

Make excerpts link to post

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 › Make excerpts link to post

This topic is: not resolved

Tagged: archive, archives, Excerpt, excerpts

  • This topic has 4 replies, 2 voices, and was last updated 10 years, 5 months ago by Victor Font.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • December 1, 2015 at 11:12 pm #172406
    DavidB
    Member

    I use custom excerpts in my archives. I'd like to turn the excerpts into clickable links. Does anyone know how? The WordPress forum has a couple questions like this, but no helpful answers. Thanks so much!

    http://www.theflyingcomma.com/
    December 3, 2015 at 3:36 am #172571
    Victor Font
    Moderator

    Wrap the excerpt in a hyperlink:

    add_filter( 'the_excerpt', 'vmf_excerpt_link' );
    function vmf_excerpt_link( $text ) {
        $excerpt = '<a class="excerpt-link" href="' . get_permalink() . '">' . $text . '</a>';
        return $excerpt;
    }

    Regards,

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

    December 3, 2015 at 5:25 pm #172652
    DavidB
    Member

    Thanks so much!

    December 3, 2015 at 6:26 pm #172657
    DavidB
    Member

    The code works perfectly. I just have a question about why. How does vmf_excerpt_link "know" that it should take the_excerpt as its argument? (I don't know php, obviously, but I want to learn.)

    Thanks again.

    December 4, 2015 at 5:18 am #172724
    Victor Font
    Moderator

    It knows because of the 'the_excerpt' argument in add_filter. Here's more detail: https://codex.wordpress.org/Function_Reference/the_excerpt


    Regards,

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

  • 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

© 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