WordPress.org

Ready to get started?Download WordPress

Forums

get_excerpt() returns empty string (2 posts)

  1. ecsancho
    Member
    Posted 8 months ago #

    Greetings

    I'm grabbing a post outside the loop by using $p=get_post(id). However wen trying to grab excerpt directly from post by using $p->post_excerpt or get_excerpt(id) and both returning empty. What gives? Em I missing something? Thanks in advance.

  2. ecsancho
    Member
    Posted 8 months ago #

    Solved it by using setup_postdata( $p ); echo get_the_excerpt();

Reply

You must log in to post.

About this Topic

Tags

No tags yet.