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

Possible to add same caption to all photos in a gallery?

Gallery with the same caption to all images: Here are two different ways to achieve this dynamically, without editing the caption for each image in the gallery. If we use the custom attribute same_caption in our gallery shortcode: then we can get the same caption for that gallery. Before: After: This is independently supported by … Read more

Media gallery – inserting full size images without link

UPDATE I’ve just submitted a core patch to add link=”none” support to the shortcode. ORIGINAL ANSWER You don’t need to hack core to do what you want to do; just use the appropriate shortcode parameters, e.g.: If you want to change the defaults, then use the post_gallery filter: function mytheme_gallery_shortcode_defaults( $output, $attr ) { global … Read more

Proper Way to Remove Thumbnail Links In Gallery

Instead of using 2 separate functions to grab the attachment you can use the same function, and then add the URL in separately using wp_get_attachment_url, making the logic much clearer, and reducing the amount of work needed: e.g. $image = wp_get_attachment_image( $id, $size, false ); // if it’s set to not show the image link … Read more

Define size for `get_post_gallery_images`, they seem to have been resized to 150×150

If you want get_post_gallery_images to give you full size images, you can use the following: // Use full size gallery images for the next gallery shortcode: add_filter( ‘shortcode_atts_gallery’, ‘wpse_141896_shortcode_atts_gallery’ ); // Your code: $gallery = get_post_gallery_images( $post ); foreach ($gallery as $img) { ?> <li><img src=”https://wordpress.stackexchange.com/questions/141896/<?php echo $img; ?>” /></li> <?php } where /** * … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)