Forums

[resolved] No line break between excerpt and read more (4 posts)

  1. terra100w
    Member
    Posted 7 months ago #

    Does anyone know how to alter this code so that there is no line break between the excerpt and the "Read More"?

    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');
  2. alchymyth
    The Sweeper
    Posted 7 months ago #

    try:

    return $output . '<br /><a href="'. get_permalink($post->ID) . '">Read More ...</a>';
  3. terra100w
    Member
    Posted 7 months ago #

    Alchymyth - I tried your code, but it added a line. So, it doesn't work.

    Anyone have other ideas?

  4. terra100w
    Member
    Posted 7 months ago #

    I have found a simpler solution. I am now not using this code at all. Instead, I hand code the excerpt in the post to include the hyperlink to the article using html. Easier. Thanks!

Reply

You must log in to post.

About this Topic

Tags