What does `get_the_excerpt()` return when called outside the loop without an argument?

WordPress Expert Easy

WordPress Expert — Easy

What does `get_the_excerpt()` return when called outside the loop without an argument?

Key points

  • `get_the_excerpt()` without an argument retrieves the excerpt of the current post
  • The function is context-sensitive and relies on the global $post object
  • It will not return an empty string or throw a PHP error in this scenario

Ready to go further?

Related questions