WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Line Break for Continue Reading link from excerpts (3 posts)

  1. databell96
    Member
    Posted 1 year ago #

    Have a question regarding the Continue Reading link that appears on excerpts in my blog. I know that link is created in functions.php of my theme like this:

    /**
     * Returns a "Continue Reading" link for excerpts
     */
    function twentyeleven_continue_reading_link() {
    	return ' <a href="'. esc_url( get_permalink() ) . '">' . __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyeleven' ) . '</a>';
    }

    What I want to know is if there is a way I can add a line break to the text so Continue Reading appears on it's own line? Right now, by default, it appears as part of the overall paragraph.

  2. alchymyth
    The Sweeper & Moderator
    Posted 1 year ago #

    untested, change the one line to:

    return ' <br /><a href="'. esc_url( get_permalink() ) . '">' . __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyeleven' ) . '</a>';

    http://www.w3schools.com/tags/tag_br.asp

  3. databell96
    Member
    Posted 1 year ago #

    Yep. Worked great! Thanks.

Topic Closed

This topic has been closed to new replies.

About this Topic