Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Excluding specific DIVs? AJS-own "blocking" tags? › Reply To: Excluding specific DIVs? AJS-own "blocking" tags?
Hi,
The plugin only indexes the parts of the post content, so the sidebars are probably also part of the page builder and stored within the post content. If it is stored in the raw content as a shortcode, then you could add the sidebar shortcode to the exceptions list, and that may resolve it: https://i.imgur.com/hQFV6ft.png
If it does not have a separate shortcode, then it is probably still possible, but can be difficult, and will require a programmatical solution. The post content, before the index table tokenization goes through 2 filter hooks, which let you access and change the content:
$content = apply_filters( 'asp_post_content_before_tokenize_clear', $the_post->post_content, $the_post );
..and..
$filtered_content = apply_filters( 'asp_post_content_before_tokenize', $content, $the_post );
I would start by hooking into the first one, to see what the content looks like, and then try to figure out a way, possibly via PHP DomDocument to find the sidebar nodes, and remove them.