I got a site that all of its pages (besides the blog), are implemented using custom page templates.

The custom templates use static HTML content, which, I believe, isn't indexed in the catabase.

Apparently, WP does not search inside these pages. Anyone has an idea how I can achieve that? What solutions do I got to be able to make WP become aware of the content? Some way to store the content inside the db? Last option is to rebuild the theme, and I wish to avoid that.

Thank you

Example for a custom template

2 Answers 2


In this situation I would use a third-party search, like embedding a form to perform a Google search of the site.

There's also Algolia, with the WP Search with Algolia WordPress plugin, that may search both WordPress and static content.

  • Thanks man, but I think ill go with "Custom Fields" option
    – neoswf
    Jun 2, 2023 at 19:05
  • Mmm, sounds like I misunderstood your question then. I thought you had static HTML files that were part of the site, but I now understand that it's HTML code which you'll drop into WordPress pages.
    – Caleb
    Jun 2, 2023 at 19:38
  • No @caleb, you got it right. its static pages embedded inside custom templates. The solution is to expose them to WP, and implement them inside the DB, so the solution would be CF.
    – neoswf
    Jun 2, 2023 at 20:52
  • Ajax Search Lite might also be able to solve this. It has lot's of configuration options out of the box, nicely customizeable on the frontend. Maybe worth a try. Jun 6, 2023 at 19:10

After searching on the subject, I concluded to use Custom fields approach, which i prefer over using ACF plugin.

Here is a reference for this approach - https://www.dreamhost.com/blog/guide-to-wp-custom-fields/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.