Changing Gallery images size?

Use the shortcode_atts_gallery filter to override the size of the images used before making your call to get_post_gallery_images. add_filter(‘shortcode_atts_gallery’,’force_large_images’,10,3); function force_large_images($out, $pairs, $atts) { $out[‘size’] = ‘large’; return $out; } Make sure to remove the filter when you have your data, or all your galleries will always use large images. remove_filter(‘shortcode_atts_gallery’,’force_large_images’,10,3);

have WP Gallery display the title instead of caption

The quick & dirty way, to set the title as caption, would be to use SQL (untested): UPDATE wp_posts SET post_excerpt = post_title WHERE post_excerpt=”” AND post_type=”attachment” AND post_status=”inherit” AND post_mime_type=”image/jpeg” AND ID = 123 Here we target the jpeg image with ID 123 and empty caption. Note I added the ID = 123 and … Read more

NextGen – Display Image Count Per Gallery

Using your above code, you were just missing the WHERE clause. Hopefully that should work. <?php global $wpdb; $images = intval( $wpdb->get_var(“SELECT COUNT(*) FROM $wpdb->nggpictures WHERE galleryid = {$gallery->ID}”) ); ?> <a rel=”prettyPhoto” href=”https://wordpress.stackexchange.com/questions/73192/<?php echo $image->imageURL ?>” <?php $image->thumbcode ?>> <span>view</span> </a> <?php echo $images; ?> pictures It’s not the best way to implement it, … Read more

How to get post attachments in gallery post format template

i had sort out this with function get_post_gallery find the answer if ( ! function_exists( ‘flexi_gallery_slideshow’ ) ) : /** * Display an optional post read more link * */ function flexi_gallery_slideshow( ) { echo ‘<ul class=”bxslider”>’; if ( get_post_gallery() ) : $gallery = get_post_gallery( get_the_ID(), false ); /* Loop through all the image and … Read more

WordPress 3.5 Gallery Menu Order not set?

it seems to me, after going through the source codes (both PHP and JS), that gallery and it’s order is not saved to database at all. Gallery exists only in JS when you are creating that and even does not persist when you leave a post editing page. Gallery gets saved only by inserting gallery … Read more