WordPress.org

Forums

returning the_excerpt to a variable (2 posts)

  1. Phil Johnston
    Member
    Posted 7 years ago #

    Just wondering if it is possible pass the value of the_excerpt to a variable instead of printing it to the screen?

  2. MichaelH
    Member
    Posted 7 years ago #

    Believe this should work:
    $my_excerpt = get_the_excerpt();

Topic Closed

This topic has been closed to new replies.

About this Topic