Skip to main content
1 of 4
fuxia
  • 107.1k
  • 38
  • 255
  • 459

Just count the spaces and add 1:

$word_number = substr_count( get_the_content(), ' ' ) + 1;
fuxia
  • 107.1k
  • 38
  • 255
  • 459