Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter niknak

    (@niknak)

    Thanks for the response Richard. I was able to install the site locally using MAMP. When I attempt to do the same process with my new host (ipage) I either get internal server errors or php permissions issues. I’ve opened a ticket with them to help figure it out.

    If I get it to work, I’ll post the details.

    Thread Starter niknak

    (@niknak)

    $output = apply_filters( 'img_caption_shortcode', '', $attr, $content );
    	if ( $output != '' )
    		return $output;
    
    	$atts = shortcode_atts( array(
    		'id'	  => '',
    		'align'	  => 'alignnone',
    		'width'	  => '',
    		'caption' => '',
    		'class'   => '',
    	), $attr, 'caption' );
    
    	$atts['width'] = (int) $atts['width'];
    	if ( $atts['width'] < 1 || empty( $atts['caption'] ) )
    		return $content;
    
    	if ( ! empty( $atts['id'] ) )
    		$atts['id'] = 'id="' . esc_attr( $atts['id'] ) . '" ';
    
    	$class = trim( 'wp-caption ' . $atts['align'] . ' ' . $atts['class'] );
    
    	if ( current_theme_supports( 'html5', 'caption' ) ) {
    		return '<figure ' . $atts['id'] /*. 'style="width: ' . (int) $atts['width'] . 'px;" class="'*/. esc_attr( $class ) . '">'
    		. do_shortcode( $content ) . '<figcaption class="wp-caption-text">' . $atts['caption'] . '</figcaption></figure>';
    	}

    In the media.php file, I found where the inline style for width is added and commented it out and it did the trick. But I’d like this to be a permanent solution. Any ideas?

    Thread Starter niknak

    (@niknak)

    Woot! I figured it out. All I have to do is use the the_category template tag. Piece o’ cake.

    Thread Starter niknak

    (@niknak)

    Thanks, Michael. I added a single.php file with the next_post_link and previous_post_link just outside of The Loop and it worked perfectly!

Viewing 4 replies - 1 through 4 (of 4 total)