Forum Replies Created

Viewing 1 replies (of 1 total)
  • Thread Starter lelandmcf

    (@lelandmcf)

    Ok, I figured it out. WordPress did not place a “;” after the css and the browser disregarded it all I did was added this PHP code to functions.php:

    function fb_img_caption_shortcode($attr, $content = null) {
    
    	// Allow plugins/themes to override the default caption template.
    	$output = apply_filters('img_caption_shortcode', '', $attr, $content);
    	if ( $output != '' )
    		return $output;
    
    	extract(shortcode_atts(array(
    		'id'	=> '',
    		'align'	=> 'alignnone',
    		'width'	=> '',
    		'caption' => ''
    	), $attr));
    
    	if ( 1 > (int) $width || empty($caption) )
    		return $content;
    
    	if ( $id ) $id = 'id="' . $id . '" ';
    
    	return '<div ' . $id . 'class="caption wp-caption ' . $align . '" style="width: ' . (10 + (int) $width) . 'px;">'
    	. do_shortcode( $content ) . '<p class="wp-caption-text">' . $caption . '</p></div>';
    }
    
    add_shortcode('wp_caption', 'fb_img_caption_shortcode');
    add_shortcode('caption', 'fb_img_caption_shortcode');
Viewing 1 replies (of 1 total)