What is the difference between `the_content()` and `get_the_content()` in WordPress?

WordPress Fundamental Medium

WordPress Fundamental — Medium

What is the difference between `the_content()` and `get_the_content()` in WordPress?

Key points

  • the_content() applies filters and echoes content
  • get_the_content() returns raw unfiltered content
  • the_content() displays formatted content on the page
  • get_the_content() retrieves content as stored in the database

Ready to go further?

Related questions