WordPress.org

Ready to get started?Download WordPress

Forums

How to link excert_more (2 posts)

  1. ProbablyBest
    Member
    Posted 8 months ago #

    I am currently using excerpt to display a bit of my content and then displaying a read more after that. However can you get it to link to the actual posts itself?

    Thanks!

  2. sdwoods619
    Member
    Posted 7 months ago #

    [please make sure to mark any posted code - http://codex.wordpress.org/Forum_Welcome#Posting_Code ]

    function new_excerpt_more( $more ) {
    	return ' <a class="read-more" href="'. get_permalink( get_the_ID() ) . '">Read More</a>';
    }
    add_filter( 'excerpt_more', 'new_excerpt_more' );

    This is found under the_excerpt()
    http://codex.wordpress.org/Function_Reference/the_excerpt

    I hope this helps.

Reply

You must log in to post.

About this Topic