Problems with highlighting in post content
…efficient in-page search feature that can be used to find the matching content. Another option is to adjust the wp_kses_post() functionality with the wp_kses_allowed_html filter hook. If you need to allow CSS styles, for example, you can use this snippet: add_filter( ‘wp_kses_allowed_html’, function( $html, $context ) { if ( ‘post’……content is passed through the wp_kses_post() function which strips out the malicious content, but also useful content. The easy solution for these problems is to disable the “Highlight query terms in documents” setting. I don’t think it is all that useful in most cases, and all good browsers have an……a specific page, you can disable the highlighting feature on that page only: add_action( ‘wp_head’, function() { if ( is_page( 123 ) ) { remove_filter( ‘the_content’, ‘relevanssi_highlight_in_docs’, 11 ); } } ); This checks the current page ID and if it’s 123, unhooks the filter function that adds the highlighting….