Title: Exclude content inside a shortcode
Last modified: November 12, 2018

---

# Exclude content inside a shortcode

 *  [SeeThrough Web](https://wordpress.org/support/users/seethroughweb/)
 * (@seethroughweb)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/exclude-content-inside-a-shortcode/)
 * Hello!
 * Is there a way to exclude content inside a shortcode?
 * We are using the Divi theme and want to exclude content inside fullwidth sliders
   from the search results.
 * Thank you.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fexclude-content-inside-a-shortcode%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Author [Mikko Saari](https://wordpress.org/support/users/msaari/)
 * (@msaari)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/exclude-content-inside-a-shortcode/#post-10874283)
 * Exclude where? In indexing, or in excerpts? What is the name of the shortcode
   you want to exclude?
 *  Thread Starter [SeeThrough Web](https://wordpress.org/support/users/seethroughweb/)
 * (@seethroughweb)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/exclude-content-inside-a-shortcode/#post-10876445)
 * Hi Mikko,
 * Ideally both, we don’t want the content to be indexed or shown in the excerpts.
 * The shortcode starts with et_pb_fullwidth_slider
 *  Plugin Author [Mikko Saari](https://wordpress.org/support/users/msaari/)
 * (@msaari)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/exclude-content-inside-a-shortcode/#post-10878134)
 * If you add this to your theme functions.php and rebuild the index, does it fix
   the problem?
 *     ```
       add_filter( 'relevanssi_page_builder_shortcodes', 'rlv_fullwidth_slider' );
       function rlv_fullwidth_slider( $shortcodes ) {
           array_unshift( $shortcodes, '/\[et_pb_fullwidth_slider.*?\].*\[\/et_pb_fullwidth_slider\]/' );
           return $shortcodes;
       }
       ```
   
 * If so, I can make this adjustment to Relevanssi Divi features in the next version.
   Currently Relevanssi will just remove the slider shortcode tags, but not the 
   contents.
 *  Thread Starter [SeeThrough Web](https://wordpress.org/support/users/seethroughweb/)
 * (@seethroughweb)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/exclude-content-inside-a-shortcode/#post-10884620)
 * Hi Mikko,
 * No we’re still seeing the content on the search results.
 *  Plugin Author [Mikko Saari](https://wordpress.org/support/users/msaari/)
 * (@msaari)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/exclude-content-inside-a-shortcode/#post-10886270)
 * Have you made the [change outlined here](https://www.relevanssi.com/knowledge-base/divi-page-builder-and-cleaner-excerpts/)
   to make Divi use Relevanssi excerpts? That is, are those excerpts generated by
   Relevanssi in the first place?

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Exclude content inside a shortcode’ 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/)

 * 5 replies
 * 2 participants
 * Last reply from: [Mikko Saari](https://wordpress.org/support/users/msaari/)
 * Last activity: [7 years, 6 months ago](https://wordpress.org/support/topic/exclude-content-inside-a-shortcode/#post-10886270)
 * Status: not resolved