• Resolved itsjohn

    (@itsjohn)


    hey guys.
    i’m new to this, but i can’t seem to have the default gallery images to be something else other than the thumbnail size. is it possible to change that instead of having to go in each post and adding size=”large” in the shortcode?

    this is for wordpress 3.3

    thanks!

    John

Viewing 3 replies - 1 through 3 (of 3 total)
  • No.

    Thread Starter itsjohn

    (@itsjohn)

    hmm i thought i was on to something here,

    add_filter( 'post_gallery', 'new_gallery_shortcode', 10, 3 );
    function new_gallery_shortcode( $output, $attr ) {
    
    	// Allow plugins/themes to override the default gallery template.
    	$output = apply_filters('post_gallery', '', $attr);
    	if ( $output != '' )
    		return $output;
    
    	extract(shortcode_atts(array(
    		'order'      => 'ASC',
    		'orderby'    => 'menu_order ID',
    		'id'         => $post->ID,
    		'itemtag'    => 'dl',
    		'icontag'    => 'dt',
    		'captiontag' => 'dd',
    		'columns'    => 3,
    		'size'       => 'medium',
    		'include'    => '',
    		'exclude'    => ''
    	), $attr));
    
    }

    Thread Starter itsjohn

    (@itsjohn)

    my method is probably not the right one, but i just copied that entire function from the core and pasted in the theme’s functions.php and changed whatever it is i needed to change.

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

The topic ‘wordpress gallery’ is closed to new replies.