Usually when search results pull a page’s content into a section for an excerpt, it runs the content through a filter which runs strip_tags
or some equivalent WordPress specific function that removes any and all HTML tags so as to not break the site due to a opening <div>
tag not having a closing partner because the excerpt cut off the ending before it was properly closed, and would then potentially break the layout of the site, and other reasons, but that’s the simplest example.
To customize the behavior, you will probably have to edit search.php or content-search.php (if it exists) to pull in your own version of the content to show, whether it be all the content, or a modified version of the excerpt system.
Related Posts:
- Multiple keyword search
- How to loop for every result found in the_content() when using the search query?
- Is there any advantage of using default WordPress Search instead of creating a custom one?
- Cutom wp_query for geolocation search, pagination not working
- How to extend WP_query to a specific table?
- Add to search posts query array with post IDS which will appear first
- Nested meta_query with multiple relation keys
- Can I force WP_Query to return no results?
- Post_count only shows the number of results per page
- WP Query where title begins with a specific letter
- Search multiple custom fields by using meta_query
- Order Search Results Page by meta_value If no Value Return Remaining Results
- How can I save an array from a random post sequence for later use?
- Tracing the life of a query
- Limit search results to exact match
- Pagination broken when merging search results with additional WP_Query
- Custom search form with empty parameters
- Get number of comments after modifying comment query
- Multiple search queries on one page
- $wpdb->insert inserting two rows in database
- WP Query search for attachments and their exact title
- Including only current user’s posts in search
- wp_query ‘s’ parameter does not work with custom post type
- Custom category search box for WordPress
- Refine search results using WP_Query
- Create unique page without header.php for json feed
- How to find exact match for search term in WP_Query? What is the additional string added in LIKE query in WP_Query?
- Search Posts with Custom Fields as query
- Creating a custom search for a specific post type
- Custom Search Result Page displaying only 1 result.
- Sub-loop / nested loops Best Practices
- Assigning a meta_query value based on regexp to wp_query fails
- Search pages that are a child of the current page
- Clean up WordPress code that repeats
- Include tags in WP_Query
- Search for multiple tags?
- wp_query ‘s’, search filter with pagination is not working
- How to use wp_query to post count by search term > group post count by date > convert to json. (ex. result 12-21-2020 – 343)
- Extend product search with meta in WooCommerce
- How to list custom fields as headers and list all pages sharing that custom field under it?
- Display filtered results into custom page
- Search Query for multiple categories using ‘OR’ but having certain categories be ‘AND’
- query_vars overriding WP_Query args
- Query with search and subscribers only output
- how can I override The Events Calendar query modifications?
- Include data from custom table in WP_Query
- echo a specific meta_key queried through a custom post
- How do I get my custom query to work with search results after the first page?
- Modify Search Query if original Query gave no results
- Exclude posts with specific metadata from search?
- Include post content of linked posts in search
- Replacing search results with custom external query
- Prevent author bio page from showing in search results
- How do I amend wp_query before it is run/executed?
- WordPress Custom Search Form Displaying Unexpected Results
- How to properly use AND / OR in custom search
- How to avoid bypass of search bar rules?
- Hide products in uncategorized category from search results
- How to order posts on each different category?
- How do you determine if a result in a search query is a post or a page?
- Slow Query On Search
- How To Keep Search Title the same on paged Results
- How to restrict search on a certain page to only return results against custom taxonomies?
- Filter out a meta key in the Search results page with two CPT
- Query by key or author
- Custom wp_query – I’m getting ‘all’ post, not the specific post in the query
- Ignore image urls in wp_query search
- meta_query with array as value with multiple arrays
- Can I make a search query which includes a space?
- How to make a query returning pages from multiple parents
- Prioritising and Ordering Posts By Category Name Using A Custom Loop
- My combination of ‘post_type’ and ‘tax_query’ not working?
- How to make the WP query search for the “s” arg in other places too
- Excluding posts from search results page with meta query not working
- WP_Query no result if keyword contains number
- Multiple WP_Query args combinations according to post type
- WP Query for all events prior to current date
- How to use jQuery validation to set the search bar to accept only a specific input?
- getting posts by tags
- Custom Post Type WP_Query with filters and search
- WordPress search page pagination displaying but not functional
- Search has query that will return no results
- WP Query – Search in title or author_name
- Limit default Search query to post_title
- Get posts by similar names and categories
- Multiple values in WP_Query : category__and
- Order & Orderby clause not working with custom query
- How can I modify standard search query to include also ACF custom fields values?
- WordPress WP_Query offset parameter not working with search parameter
- $wp_query when new WP_Query
- Need help setting up a search form for wordpress [duplicate]
- Switched from query_posts to wp_query, pagination no longer working
- Custom search: Search posts but display parent page in results
- Help with showing text when something is entered in my search bar
- shortcode with $atts with strange results
- Filtering product search results using tags
- Using ‘meta_query’ with the ‘pre_get_posts()’ hook disables searching for post titles
- How does Show Posts based on a keyword search work in WP_Query
- I need to get all categories from a WP_Query
- AJAX multiple search boxes not merging with array merge