• 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

Sixteen Nine excerpt question

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 › Sixteen Nine excerpt question

This topic is: not resolved

Tagged: sixteen nine pro

  • This topic has 4 replies, 2 voices, and was last updated 9 years, 11 months ago by Sjoerd Smeets.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • May 30, 2015 at 1:31 am #154191
    Sjoerd Smeets
    Participant

    Hello, i'm trying something with the Sixteen Nine Pro template but it isn't working yet. Maybe someone could point me in the right direction..

    On the homepage i'm displaying 5 recent post excerpts. When the post has less then 50 words it doesn't display [...], if more than is does.

    What i want is displaying in both cases a permalink to the post with a custom [continue reading] instead of [...]

    It should be possible (i guess) but using the code snippets about post excerpts (on my studiopress) doesn't seem to be the right thing to do. It doesn't do anything.

    May 30, 2015 at 1:42 am #154193
    Brad Dalton
    Participant

    Choose the content limit or modify the read more link http://my.studiopress.com/snippets/post-excerpts/


    Tutorials for StudioPress Themes.

    May 30, 2015 at 1:53 am #154195
    Sjoerd Smeets
    Participant

    As explained above i already tried that but it isn't working.

    In functions.php i added:

    //* Modify the WordPress read more link
    add_filter( 'the_content_more_link', 'sp_read_more_link' );
    function sp_read_more_link() {
    	return '<a class="more-link" href="' . get_permalink() . '">[Continue Reading]</a>';
    }

    but nothing shows up as you can see http://www.sjoerdsmeets.info/

    May 30, 2015 at 2:14 am #154196
    Brad Dalton
    Participant

    Nope. Please read the description for each snippet.

    1. The code you're using only works when using the more tag.
    2. When using the content limit, use the 2nd snippet
    3. When using excerpts, use the 3rd.

    The the_content_more_link function, has no effect on the content limit or excerpts. It only applies to the more tag


    Tutorials for StudioPress Themes.

    May 30, 2015 at 2:48 am #154197
    Sjoerd Smeets
    Participant

    Solved it by using the following..

    //* Modify the length of post excerpts
    add_filter( 'excerpt_length', 'sp_excerpt_length' );
    function sp_excerpt_length( $length ) {
    	return 20; // pull first 20 words
    }
    
    // Replaces the excerpt "more" text by a link
    function new_excerpt_more($more) {
           global $post;
    	return '<br /><a class="moretag" href="'. get_permalink($post->ID) . '">Lees verder...</a>';
    }
    add_filter('excerpt_more', 'new_excerpt_more');

    Thanks!

  • 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