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

Post photo galleries [closed]

The site you linked to seems to do this by making one image the post thumbnail (Featured image in the admin screen). So you attach multiple images to your post, and then choose one of them as the featured image. You then modify your theme to show only the post thumbnail and no text in … Read more

Add size in Gallery Settings in Media Library

first +1 for the first commenter . NEVER CHANGE CORE FILES. this function will do the trick for your media upload : function dl_custom_image_sizes_add_settings($sizes) { unset( $sizes[‘thumbnail’]); //comment to remove size if needed //unset( $sizes[‘medium’]);// uncomment to remove size if needed //unset( $sizes[‘large’]);// uncomment to restore size if needed unset( $sizes[‘full’] ); // comment to … Read more

The WordPress Gallery, Grabbing The Link and Images?

Attachments in a gallery are their own posts, with some special settings. To get a list of all the attachments for a given post, you basically just create a new query and specify the post parent and attachment type. $gallery_images = new WP_Query(array( ‘post_parent’ => $post->ID, ‘post_type’ => ‘attachment’, ‘post_mime_type’ => ‘image’, ‘post_status’ => ‘inherit’, … Read more

ID of images from gallery

You can find out the IDs of which images are included in a gallery by switching to the Text editor tab and look for a piece of code like this: The comma-separated list of image IDs are enclosed in the ids attribute If you’re looking to find out IDs of existing images in order to … Read more

Creating a gallery custom post type?

Can I show different text for linking to gallery posts ? YES, Here’s how to do it, put this where you want to output text as – readmore/view photos, depending on theme or way you’re generating these text we can use filter to change it as per custom post type. <?php echo ‘<a href=”‘.the_permalink().'”>’; if … Read more

How do I get gallery thumbnail URL and change the default thumbnail size?

The thumbnail size is based on the dimensions defined in WordPress Dashboard > Settings > Media, unless your theme overrides it. how can I make my theme override it? To change default post-thumbnail size, you need to use set_post_thumbnail_size. Add this in your functions.php file: if ( function_exists( ‘add_theme_support’ ) ) { add_theme_support( ‘post-thumbnails’ ); … Read more

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