[Resolved] Excerpt 0 in archives for posts that have a Read More tag in the Post Editor

Home Forums Support [Resolved] Excerpt 0 in archives for posts that have a Read More tag in the Post Editor

Home Forums Support Excerpt 0 in archives for posts that have a Read More tag in the Post Editor

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1532877
    Alexandra

    Hey guys,

    I have a quick question, please.
    I have set the Excerpt word count to 0 in the Customizer, but an excerpt is still showing on archive pages.
    Sample archive page
    I have figured out that this only happens with older posts that were created with the Classic Editor, where I was manually inserting a Read More tag.
    How can I have no excerpt for those posts in archives without having to manually edit each of those posts to remove the Read More tags?
    Thank you so much!

    #1533031
    David
    Staff
    Customer Support

    Hi there,

    yes when using the More Tag it overrides the auto excerpt, try adding this PHP snippet to stop that from happening:

    add_filter( 'generate_more_tag', '__return_empty_string' );

    #1533194
    Alexandra

    Hi, David!
    A big, big thank you for this! ๐Ÿ™‚
    You have helped me save hours of work!

    #1533222
    David
    Staff
    Customer Support

    Glad to be of help ๐Ÿ™‚

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.