WordPress.org

Ready to get started?Download WordPress

Forums

Iframe not working inside column shortcode (1 post)

  1. webriti
    Member
    Posted 1 year ago #

    Hi community

    Bit stucked help me out....
    I am developing a themes shortcode functionality .. added a column shortcode, working fine for all the media types except iframe and objects..
    here is my code

    function column_shortcode( $atts, $content = null ) {
    	extract( shortcode_atts( array(
    	  	'offset' =>'',
          	'size' => '',
    	  	'position' =>''
          ), $atts ) );
    
    	  $size=$atts['size'];
    	  $style='';
    	  if($size=='half'){$class='span6'; $id='spacer'; }
    	  else if($size=='third') {$class='span4'; $id=''; $style='margin-right: 15px;'; }
    	    else if($size=='fourth') {$class='span3'; $id='';  }
    		  else if($size=='sixth') {$class='span2'; $id='Column';  }
    	        else if($size=='two-third') {$class='span8'; $id=''; $style='margin-right: 5px; padding-right:10px;';}
    			  else if($size=='three-fourth') {$class='span9'; $id=''; $style='margin-right: 5px;'; }
    	   $out='
    	          <div class="'.$class.'"  id="'.$id.'" style="'.$style.'">
    			  <p>'.do_shortcode($content).'</p></div>
    			';
    
    	 return $out;
    }
    add_shortcode('column', 'column_shortcode');

    please guide me on this

Topic Closed

This topic has been closed to new replies.

About this Topic