WordPress.org

Ready to get started?Download WordPress

Forums

Accessing the_excerpt from within a plugin (3 posts)

  1. imeyer
    Member
    Posted 5 years ago #

    I've tried about 15 different ways to get at the excerpt of the post to send off to tumblr, but I'm getting nothing.

    Currently I'm using this chunk of code:

    $post = get_post($post_ID);
    $post_excerpt = $post->post_excerpt;

    Nothing is in $post_excerpt however. I switched it to post_content and that comes through fine. Any ideas?

    I'm using WP 2.6.1

  2. imeyer
    Member
    Posted 5 years ago #

    Oh, this is assuming that if I *don't* set an excerpt, that WP makes one automagically.

  3. imeyer
    Member
    Posted 5 years ago #

    Anyone have any tips?

Topic Closed

This topic has been closed to new replies.

About this Topic