WordPress.org

Ready to get started?Download WordPress

Forums

Boilerplate
[resolved] Excerpt More Link Customization (3 posts)

  1. bkernan
    Member
    Posted 3 years ago #

    Hi, great theme! my fav blank theme so far.

    I'm unable to change the_excerpt()'s read more link by using a child theme. This theme has it set to read Continue reading with a special character. I don't want to edit the boilerplate parent them files.

    I've copied and changed the function names of the code in functions.php from the boilerplate theme into my own child themes functions.php

    I've also added
    remove_filter( 'get_the_excerpt', 'boilerplate_custom_excerpt_more' );
    remove_filter( 'excerpt_more', 'boilerplate_auto_excerpt_more' );

    But I'm still seeing the boilerplate themes continue reading links.

    I'm new to child themes and have done some reading but may have missed something. I'd greatly appreciate any thoughts on this.

    Thanks!
    Brittney

    http://wordpress.org/extend/themes/boilerplate/

  2. Jean-Michel Morillon
    Member
    Posted 2 years ago #

    Hi,

    I hope that you've already found a solution.

    Here is mine. Use another filter "after_setup_theme" to override boilerplate config.

    function volta_setup() {
        remove_filter( 'get_the_excerpt', 'boilerplate_custom_excerpt_more' );
        remove_filter( 'excerpt_more', 'boilerplate_auto_excerpt_more' );
    }
    
    add_action('after_setup_theme', 'volta_setup');
  3. bkernan
    Member
    Posted 2 years ago #

    Hey Jean-Michel,

    thanks for this, I have not used that hook before. I'll spend some time reading the full Hooks documentation.

    I think I ended up editing the boilerplate files, so this is a cool solution.

    Thanks again,
    Brittney

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic