There’s a php function called strip_tags, see https://www.php.net/manual/en/function.strip-tags.php
You can see it implemented for your use case here: Strip HTML Tags From Search Results
Hope that helps.
Related Posts:
- How to create a custom search for custom post type?
- Extending the search context in the admin list post screen
- Include custom taxonomy term in search
- Creating a search form for custom fields
- Searching multiple custom post types and pages
- How can I change the admin search posts fields?
- group search results by post type?
- Development of a WordPress Search Plugin – Best Practices
- Admin Area Custom Type Search By Meta Fields Without Title & Content
- Custom post type admin search
- Using standard search function with custom post type
- The right way to create a custom search page for complex custom post types
- Search everything (posts, pages, tags, cpt, meta)
- Search Custom Post Type with all meta attached?
- WordPress Search documentation: how to improve search query using taxonomy terms, custom meta fields?
- filter search result with custom post type meta key
- Custom search for custom post type, custom meta and search fields
- Limit search form to 4 custom post types only
- Search results ordered by custom post types are not grouped
- Search Post Title Only [duplicate]
- How can I include meta box content when searching?
- Customize Search to only search current custom post type
- How to search from specific post type with tags?
- How to search CPT’s by meta query from the admin dashboard?
- multiple search forms and search results
- Custom Fields vs Separate Table
- Add custom post type archives to search results?
- CPT Meta Searching
- How to filter search results by post type?
- How to create an advanced filter search?
- How to search map address in custom post type?
- Custom search results page query, link permalink to post title while separating by post types
- Custom Search for Drafts in Custom Post Type
- Multiple meta_values in the pre_get_posts filter?
- How to order separated Custom Post Search results
- search also in taxonomy, tags and custom fields
- Custom post type search using $_SESSION and pre_get_posts
- Can I search only some of the fields of a custom post type?
- Custom Post Type And “fopen”
- Filter custom posts using auto populated dropdown selectors
- Make parts of your wordpress website completely built with data from external APIs?
- Including metaboxes from custom post types in global search — continued
- Custom post type not showing in search result
- What to and how to proceed with CPT to make DB small and efficient?
- Auto Complete Search
- Remotely search WordPress sites using xml-rpc
- BBPress Search results in WordPress search
- Limit Search to Post Type With Apostrophe return search not found
- Advanced search form with filters for custom taxonomies
- filter search custom field query
- Include custom taxonomy term in search
- Search one custom post type ONLY, disable “all posts”
- Add custom attributes to a post
- how to get this tax_query working?
- Custom Taxonomy Search result page
- How to group search results by post type and only if post type result is not empty?
- find custom post type post by searching its custom field with my string
- Prevent A Specific Custom Post Type Showing In WP Search Results Page
- Hide custom post type from search based on custom taxonomy
- Pagination on search results page
- Ideas on how to organize a project [closed]
- Best way to create a search for custom post type by custom field values
- Multi Parameter search with custom post type category and tag
- Redirecting search to specific templates with $_GET[“post_type”]
- Search custom type post
- How to Implement Search Functionality?
- How to have multiple search result pages in wordpress with taxonomy terms listed
- Change search query in wordpress custom post type
- Creating a custom WP query for a Custom Post Type
- WP_List_Table Inside Metabox Not Working on Clicking Search Button
- Custom Post type doesn’t appear in search results
- search results to show individual ACF fields from inside custom posts
- post_type incorrect for custom post type
- Live search by custom tag
- how to create custom taxonomy drop downs for parents and child
- Custom Archive – hide posts until a search is made?
- Display result as “prefix+ID” and show in the search result as bookcode
- Custom Post Search
- WP_Query with custom post type search showing all results every time
- Extensive search filtering and results->PDF in the front-end
- Search form to find custom meta box generated data
- 404 error Custom search results page for custom post types with friendly URL
- multiple custom post type category selection search
- Custom Search Template for Custom Post Types
- Multiple search template with separate stylesheets
- Advanced search form with filters for custom taxonomies and custom fields
- Archive custom template from search
- Searching for a single custom post type, buddypress
- Customising wordpress search and using $_GET[“s”]
- How do I do this?: If custom post type exists, echo it, else do not
- WordPress search results
- Drop Down Filter with CPT as Options for Search Form
- Searching Custom Posts content with JQuery
- WordPress search results grouped by post type
- Group search results by post type, but having a unique heading for each section?
- Multiple search forms and respective results page templates?
- Fix Custom Post Type not appearing in search results?
- Search and filter terms of a custom post type only and display results
- How can I retain get_post_type() in between consecutive searches after a search returns no results?
- How do I create a custom search function to only show contact information if they search for an exact unique identifier?