Featured Posts Widget, Excerpts, and "Read More"

Community Forums Forums General Discussion Featured Posts Widget, Excerpts, and "Read More"

This topic is: resolved

This topic contains 4 replies, has 4 voices, and was last updated by  Annamarie 6 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • #50377


    I have a scenario where I absolutely need to use excerpts with the Featured Posts Widget, and need the “Read More” link to appear below the excerpt in the widget. I’ve attempted to use this snippet to add the perplexingly absent “Read More” link to my excerpts. Unfortunately, it doesn’t seem to work.

    I’ve tried using Featured Posts Widget Amplified to no avail. I’ve also looked through the code in the default and Amplified widgets to try to locate the proper hook or filter to add this to, but I still have no clue what to modify. Is it even possible?



    Can you provide a link to your website with the “snippet” you used from Travis in place?


    Doak Heggeness

    Give this one a spin. It may need to be styled.

    /* Add Read More to Excerpts */
    function excerpt_read_more_link ( $output ) {
     global $post;
     return $output . '<a href="'. get_permalink($post->ID) . '"> Read More...</a>';
    add_filter( 'the_excerpt', 'excerpt_read_more_link' );

    Doak Heggeness, WordPress Development | Website



    @anitac — sorry I couldn’t, need to keep this site private for the time being (thus making seeking help extra difficult). However…

    @Doak — that worked perfectly!



    Thanks! That code works beautifully. I know this is an old post.. but maybe someone will see this and tell me how to style the “Read More”..?

Viewing 5 posts - 1 through 5 (of 5 total)

The topic ‘Featured Posts Widget, Excerpts, and "Read More"’ is closed to new replies.