title: Extract the_excerpt from the_content
body: <p>I'm trying to create a filter to display only the text of a the_content without the images. But not working, I tried it but it does not display anything, it is blank</p>
  
  <pre><code>add_filter('the_content', 'importgaleria');
  
  function importgaleria($content) {
      global $post;
      if (is_singular()) {
          $content=$post-&gt;post_excerpt;
          return $content;
      } else {
          return $content;
      }
  }
  </code></pre>