Title: Search results include HTML classnames
Last modified: May 21, 2026

---

# Search results include HTML classnames

 *  Resolved [DODO Internet](https://wordpress.org/support/users/studioviv/)
 * (@studioviv)
 * [2 weeks, 4 days ago](https://wordpress.org/support/topic/search-results-include-html-classnames/)
 * Hello,
 * We noticed that Ajax Search Lite also indexes HTML elements and their classnames
   inside the post content. Because of this, searches return posts that do not contain
   the searched word in the visible text, but only inside an HTML classname.
 * For example, searching for “Pointer” returns posts where this word appears only
   in a classname within the HTML markup.
 * Is there a way to disable indexing of HTML tags and attributes, so the search
   engine only looks at the actual text content?
 * Thank you in advance.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fsearch-results-include-html-classnames%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Support [Ernest Marcinko](https://wordpress.org/support/users/ernestmarcinko/)
 * (@ernestmarcinko)
 * [2 weeks, 4 days ago](https://wordpress.org/support/topic/search-results-include-html-classnames/#post-18914429)
 * Hi,
 * I’m afraid it is not possible. This Lite version searches the post contents database
   directly (it doesn’t index them separately). If the content contains the HTML
   rendered and is stored in the database, then for SQL queries it is simply text
   content.
 * All the best,
   Ernest
 *  Thread Starter [DODO Internet](https://wordpress.org/support/users/studioviv/)
 * (@studioviv)
 * [2 weeks, 4 days ago](https://wordpress.org/support/topic/search-results-include-html-classnames/#post-18914454)
 * Hello [@ernestmarcinko](https://wordpress.org/support/users/ernestmarcinko/) ,
 * Thank you for the clarification.
 * Just to confirm: since the Lite version searches the raw post content stored 
   in the database, it will always index HTML tags and classnames if they exist 
   inside the post content, correct?
 * In that case, do you have any recommended approach to prevent HTML attributes
   from affecting search results? For example:
    – stripping HTML before indexing–
   filtering the content before the SQL query – or using a hook to preprocess the
   content
 * If this is possible in the Pro version, please let me know.
 * Thanks again for your help.
 *  Plugin Support [Ernest Marcinko](https://wordpress.org/support/users/ernestmarcinko/)
 * (@ernestmarcinko)
 * [2 weeks, 4 days ago](https://wordpress.org/support/topic/search-results-include-html-classnames/#post-18914540)
 * Hi,
 * The Lite version does not have a separate index to do that unfortuantely.
 * Hooks in this case wouldn’t work, because the SQL content has to be modified 
   or rather stored in a a separate index table after extraction.
 * I can’t answer questions about the Pro version here, for that please [contact us](https://ajaxsearchpro.com/contact/).(
   Not that I don’t want to, but it is against the [forum rules](https://wordpress.org/support/guidelines/#do-not-post-about-commercial-products)
   to discuss it, it will get us both in trouble).
 * All the best,
   Ernest

Viewing 3 replies - 1 through 3 (of 3 total)

You must be [logged in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fsearch-results-include-html-classnames%2F%3Foutput_format%3Dmd&locale=en_US)
to reply to this topic.

 * ![](https://ps.w.org/ajax-search-lite/assets/icon-256x256.png?rev=3192672)
 * [Ajax Search Lite - Live Search & Filter](https://wordpress.org/plugins/ajax-search-lite/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ajax-search-lite/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ajax-search-lite/)
 * [Active Topics](https://wordpress.org/support/plugin/ajax-search-lite/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ajax-search-lite/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ajax-search-lite/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Ernest Marcinko](https://wordpress.org/support/users/ernestmarcinko/)
 * Last activity: [2 weeks, 4 days ago](https://wordpress.org/support/topic/search-results-include-html-classnames/#post-18914540)
 * Status: resolved