title: Function to remove wpautop from a specific div tag
body: <p>WordPress has a built in filter called <code>wpautop</code> that facilitates adding text in the "visual" mode. This function adds <code>&lt;p&gt;</code> and <code>&lt;br&gt;</code> to the paragraphs to provide the "what you see if what you get" output.
  <a href="https://codex.wordpress.org/Function_Reference/wpautop" rel="nofollow noreferrer">Details about this function can be found here.</a></p>
  
  <p>The above link also provides a function to remove this filter:</p>
  
  <pre><code>remove_filter( 'the_content', 'wpautop' );
  remove_filter( 'the_excerpt', 'wpautop' );
  </code></pre>
  
  <p>However, this function removes the filter from all the content when specifying <code>the_content</code>.</p>
  
  <p>I need to modify the code to target a certain <code>div</code> that has a certain class.</p>
  
  <p>I wrapped the text I want to exclude the filter from with a <code>div class="exclude-wpautop"&gt;</code> and modified the function to be:</p>
  
  <pre><code>remove_filter( 'exclude-wpautop', 'wpautop' );
  </code></pre>
  
  <p>But this didn't work.</p>
  
  <p>Also, <a href="https://stackoverflow.com/questions/49621836/how-to-create-a-shortcode-edit-a-function-to-solve-the-conflict-between-bootstra/">As I mentioned in my other question here</a>, I tried creating a shortcode to target this <code>div</code> tag, but it didn't work too.</p>
  
  <pre><code>function stop_wpautop(){
  remove_filter( 'exclude-wpautop', 'wpautop' );
  }
  add_shortcode( 'stop-wpautop', 'stop_wpautop'); 
  </code></pre>
  
  <p>Is there a way to target a specific <code>div</code> and apply the function to it? or create a shortcode that when it wraps the text, it stops the effect of the <code>wpautop</code> for this portion of text only?</p>
  
  <p>Thanks in advance.</p>