codescribblr
2/13/2014 - 9:41 PM

Simple iframe shortcode for wordpress

Simple iframe shortcode for wordpress

add_shortcode('iframe', 'iframe');
function iframe($atts) {
   extract(shortcode_atts(array(
      'src' => "",
      'width' => "800",
      'height' => "600"
   ), $atts));

   $iframe = '<iframe src="'.$src.'" width="'.$width.'" height="'.$height.'" scrolling="no" allowtransparency="yes" frameborder="0" ></iframe>';
   
   return $iframe;
}