0

Hoping someone can help shed some light here...

I have the following titles:

  • Icons & Innovators: Norman Lear
  • Muslim/American: Halal
  • 44 Charlton: Pride

I am using the native WP search.

The issue:

If I search for "Icons & Innovators", Icons & Innovators: Norman Lear is included in the results. If I search for "Norman Lear", Icons & Innovators: Norman Lear is not included in the results.

If I search for "Muslim/American", Muslim/American: Halal is included in the results. If I search for "Halal", Muslim/American: Halal is not included in the results.

So it appears that the colon is causing the issue. However, if I search "Pride", 44 Charlton: Pride is included in the results.

Gotchas:

There is one difference between these posts, in that Icons & Innovators: Norman Lear and Muslim/American: Halal were programmatically imported to the database from an API. 44 Charlton: Pride is a post that was written in the backend of WordPress.

This leads me to think that WP runs a validation on the post title and converts the colon, and that was never ran on the migrated posts.

Question(s):

Does WP change the value of a colon in the post title when a post is saved? If so, does anyone know a way of replicating it for existing post titles?

Does anyone know why content after a colon in the post title value would not return in the search results as expected?

--

Any other thoughts or advice are welcome!

Cheers.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.