Post and page content not displaying in search results

The problem in your code is that your function is only returning the content when is_page() is true, which is not on the default search results page, where is_search() is true. Likewise, the content would also not be returned on singular post pages and anywhere where is_page() is not true.

So remember that a filter callback (like your themename_iframe_wrapper() function) must always return the content, just as with shortcode handler functions.

function themename_iframe_wrapper($content) {
  if( is_page() ) {
    ... your code.
    return $content; // don't just return it here
  }

  return $content; // always return the content
}