Automatic Excerpt Not Working

I’m using the_excerpt(); on an archive page; my problem: manual excerpts display, but automatic excerpts do not (just for clarification: an automatic excerpt meaning a snippet generated from the_content(); when a manual excerpt isn’t present)

What I’ve Tried/Figured Out So Far:

  • I eliminated the possibility that the word/character length could be set to 0
  • the_content(); shows up fine
  • I removed my custom functions.php to make sure there wasn’t any conflicting code on my end
  • I’ve tried the_excerpt(); and get_the_excerpt();
  • Settings > Reading “For each article in a feed, show” (1) Full Post (2) Summary. I selected both, but nothing changes
  • The excerpt content doesn’t show up in the DOM (ie. it’s not a CSS issue)
  • I disabled all plugins

Worth Noting: I am using a template, but until recently the_excerpt(); worked.


edits: I forgot to note, the “Read More” Button shows up

enter image description here

1 Answer
1

It turns out my client added shortcodes to the beginning of the posts and the only thing I can think of is that the_excerpt was choosing what words to use from the content before stripping shortcode tags out, thus, returning a blank excerpt.

Hope this helps someone in the future

Leave a Comment