Site icon Hip-Hop Website Design and Development

Search Using Post ID

I’d like to be able to enter a post ID into the search box in order for the exact post to be returned in the search results. I’d also like to retain the ability to search the posts/page titles and content.

eg, user enters ‘#123’ in the search box, and the search results return just post 123. However, if I were to enter ‘123’ into the search box, it would return any post/page that contains ‘123’ in the content or title.

This article explains how to achieve what i’m after within the Admin – I just need the equivalent for the front-end!

Any help is greatly appreciated, thank you.