• Resolved gulliver

    (@gulliver)


    Using a child theme, what’s the sensible way to change the custom more-link text set in functions.php?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Theme Author Anders Norén

    (@anlino)

    Hi gulliver,

    Add the following code to the child themes functions.php file:

    // Child theme custom more-link text
    remove_filter('the_content_more_link', 'hemingway_custom_more_link');
    add_filter( 'the_content_more_link', 'hemingway_child_custom_more_link', 10, 2 );
    
    function hemingway_child_custom_more_link( $more_link, $more_link_text ) {
    	return str_replace( $more_link_text, __('TEXT', 'hemingway'), $more_link );
    }
    Thread Starter gulliver

    (@gulliver)

    Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Modify custom more-link text’ is closed to new replies.