Title: Exclude post content by class name
Last modified: April 19, 2018

---

# Exclude post content by class name

 *  [Jon Waldstein](https://wordpress.org/support/users/jonwaldstein/)
 * (@jonwaldstein)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/exclude-post-content-by-class-name/)
 * Hello,
 * Is it possible to exclude parts of the post content by a div’s class name? The
   site in mind is using beaver builder that includes WP menus in a sidebar type
   beaver builder widget. This is causing the menus to be indexed inside the post
   content. Since this content is dynamic, is there a way to use a filter to exclude
   the sidebar widget by defining a classname of ‘sidebar’ ?
 * Thank you,
    -Jon

Viewing 1 replies (of 1 total)

 *  Plugin Author [Mikko Saari](https://wordpress.org/support/users/msaari/)
 * (@msaari)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/exclude-post-content-by-class-name/#post-10200755)
 * The `relevanssi_post_content` filter hook gives you the post content before Relevanssi
   indexing sees it. You can manipulate it at will at that point and remove the 
   unwanted divs.

Viewing 1 replies (of 1 total)

The topic ‘Exclude post content by class name’ is closed to new replies.

 * ![](https://ps.w.org/relevanssi/assets/icon-256x256.png?rev=3529670)
 * [Relevanssi - A Better Search](https://wordpress.org/plugins/relevanssi/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/relevanssi/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/relevanssi/)
 * [Active Topics](https://wordpress.org/support/plugin/relevanssi/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/relevanssi/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/relevanssi/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Mikko Saari](https://wordpress.org/support/users/msaari/)
 * Last activity: [8 years, 3 months ago](https://wordpress.org/support/topic/exclude-post-content-by-class-name/#post-10200755)
 * Status: not resolved