WordPress.org

Ready to get started?Download WordPress

Forums

Get string from excerpt (3 posts)

  1. mrtwork
    Member
    Posted 6 years ago #

    Hi, i want to use store the string from excerpt field in wordpress post table to variable and this is what i'm writing:

    $excerpt_str = the_excerpt()
    echo $excerpt_str

    i want to store the string from excerpt to the variable excerpt_str,
    but it doesn't work the way it suppose to be...
    any solution, thanks.....

  2. ephramzerb
    Member
    Posted 6 years ago #

    Have you tried get_the_excerpt() ?

  3. mrtwork
    Member
    Posted 6 years ago #

    it works, thanks
    but here's the tricky part. I want to use that with sql string to write another plugin

    $result = mysql_query("SELECT * FROM aniwo_posts
    WHERE aniwo_content='$excerpt_str'");

    and the result doesn't come out. Any solutions? thanks..

Topic Closed

This topic has been closed to new replies.

About this Topic