wordpress-seo icon indicating copy to clipboard operation
wordpress-seo copied to clipboard

WP default search does not find pages when terms searched for are present in Yoast FAQ blocks only

Open via-lars opened this issue 5 months ago • 4 comments

  • [ x ] I've read and understood the contribution guidelines.
  • [ x ] I've searched for any related issues and avoided creating a duplicate issue.

Please give us a description of what happened

To Reproduce

Step-by-step reproduction instructions

  1. Create a page on an empty WP installation
  2. Add a Yoast FAQ block to the page
  3. Insert unqiue content wrt the page in the FAQ block
  4. Create a "pattern" from the block
  5. Save the page
  6. Use WP default frontend search (url path /?s=QUERYTERM from WP frontend home url) to search for the unique content, NOTE: you might have to create a WP search template for this.#### Expected results
  7. The page or its post id is found

Actual results

  1. The page isn't found

Screenshots, screen recording, code snippet

not applicable

Technical info

  • If relevant, which editor is affected (or editors):
  • [ x ] Block Editor
  • [ x ] Gutenberg Editor
  • [ ] Elementor Editor
  • [ ] Classic Editor
  • [ ] Other:
  • Which browser is affected (or browsers):
  • [ x ] Chrome
  • [ x ] Firefox
  • [ x ] Safari
  • [ ] Other:

Used versions

  • Device you are using:
  • Operating system:
  • PHP version:
  • WordPress version:
  • WordPress Theme:
  • Yoast SEO version:
  • Gutenberg plugin version:
  • Elementor plugin version:
  • Classic Editor plugin version:
  • Relevant plugins in case of a bug:

via-lars avatar Sep 15 '25 15:09 via-lars

Hi @via-lars Thanks for creating the issue. I tried to replicate the issue by creating a page and post with the Yoast FAQ block with Question and Answer text on it. After that, I searched and noticed that the FAQ block page was showing without any issues for the search. See: https://brushsock.s2-tastewp.com/?s=faq, https://brushsock.s2-tastewp.com/?s=question https://brushsock.s2-tastewp.com/?s=answer

If I have missed any settings or steps, please let me know.

josevarghese avatar Sep 17 '25 03:09 josevarghese

Hi @josevarghese ,

the issue occurs when the Yoast FAQ Block inserted into the page becomes a "pattern". Then a search for content only existing in that block doesn't find posts containing that block.

I updated the original post.

via-lars avatar Sep 17 '25 08:09 via-lars

Hello again, WordPress search not finding content inside pattern appears to be a general WordPress issue. It occurs for a default paragraph block as well I just found out.

via-lars avatar Sep 17 '25 08:09 via-lars

Thanks for confirming that the issue occurs only when the block is changed to a pattern.

Yes, this behavior is expected in WordPress, as patterns reuse the same content across multiple pages, so those pages won't all appear in search results. Since this isn't related to the Yoast SEO plugin or the FAQ block, I'll go ahead and close this issue.

josevarghese avatar Sep 18 '25 12:09 josevarghese