Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [gallery]

Build in WordPress gallery. Used to show multiple pictures in a grid.

-2
votes
0answers
9 views

How to make an interactive gallery of album cover art, where hovering gives a button to listen to audio clip? [closed]

I'm learning html, css and js but need some help. I'm trying to make an interactive gallery of my musical work, where hovering over an album cover gives you a button to listen to a 30s clip from that ...
0
votes
1answer
14 views

How to link Gutenberg Gallery images To Media file automatically?

Really I'm gonna be crazy :(, After searching for two months no one talking about this issue!! I'm stuck with that!! I mange a multi writers blog, and all our users uploading gallery images, and ...
0
votes
0answers
13 views

How to create a custom WordPress GALLERY TYPE

I have a custom gallery I want to implement, the thing is that I don't know how to hook my style into the galleries using the GALLERY TYPE like Jetpack does. See image below: Some help with this ...
0
votes
0answers
16 views

How to limit max. available columns in WP gallery setings?

Is there any special way to limit available columns in WP gallery settings? Default is 9, in my opinion is to much so I want limit it to max 4. I was trying CSS like this .gallery-settings .columns ...
0
votes
0answers
14 views

New Blocks: 'Gallery', how to make the picture open in new tab using link to image

I'm using the new blocks. One is 'gallery'. I can edit the blok to link to nothing, link to the 'bijlagepagina' (don't know the English translation) or link to the image itself. If I link to the image,...
0
votes
0answers
22 views

Is it possible to add gallery image instead of the post feature image in the Gutenberg editor when I'll setting this post format is gallery?

I want to add gallery images (WP new editor Gutenberg) in the post instead of the post feature image and It will be set when I'll set this post format is the gallery. Thank you.
0
votes
0answers
14 views

Create custom slider from a Gallery widget

it's been quite a long time since I've been working with Wordpress, and I've never done anything like this with it before, and I also googled my arse off trying to find a solution, but couldn't. So, ...
0
votes
1answer
22 views

Change default gallery images - Currently they are displaying full size imagese

Right now my page load file size is 350mb... for a website... The reason is that the gallery is loading in the full size 4000px+ images when they are actually a mere 250px in the page: Is it ...
0
votes
1answer
14 views

Thumbnail images missing in WP media library

I have built my own WordPress theme and applied it to my WordPress website. The issue I am having is out of the blue, the thumbnail images from the media gallery have stopped loading in and now just ...
0
votes
0answers
11 views

Import export tools for galleries of wordpress?

How to modify standard wordpress import export tools so that galleries are exported and imported correctly. I.e., below the shortcode galleries changed id numbers, which now (after the imports) ...
0
votes
1answer
20 views

hide attached images of a post

I've read an article on how to implement a custom Gallery template in wordpress posts or pages. I have a simple question, is it possible to not show the attached images inside the post content but ...
1
vote
2answers
48 views

How to use thumbnails in gallery?

Since Wordpress 5.x they've removed the thumbnail size option for galleries. Is there a way to activate or build a workaround? I like to build up a classic Lightbox gallery.
0
votes
0answers
8 views

Final Tiles Gallery - image distorted when you click to open

I uploaded the images at 752x1080 into media and created a gallery using these images. The images display fine on the page but when you click the image to open on zoom and scroll through, the image ...
0
votes
0answers
9 views

getting the list of main product pictures

I want to remove the background from the main picture (the picture that shows up in catalog) of all my products. I want to get the list of these pictures. I know all the picture are in wp_posts table ...
0
votes
2answers
20 views

Get gallery in loop through ajax

So, calling this PHP from click through ajax I manage to display Title and content in my modal. But when the code gets to get_post_gallery it always returns null. $the_query = new WP_Query(array('p' ...
0
votes
1answer
17 views

How to add new images to existing shortcode configuration?

How would I go about adding/updating images and content to an existing gallery with established shortcode? Not the most Wordpress savvy but I'd love to be able to make some changes to a site that ...
0
votes
1answer
18 views

get_post() containing gallery is outputting an unmatched closing div at the end of the content

I have created a custom page with fetches content from various posts using get_post(id). I fetch the posts using this function:- function get_my_post($id){ $get_post = get_post($id); $...
1
vote
1answer
72 views

Gutenberg MediaUpload component with default gallery functionality?

I have seen a few tutorials around utilizing the MediaUpload component from below. https://github.com/WordPress/gutenberg/tree/master/packages/editor/src/components/media-upload But none of them ...
0
votes
0answers
10 views

Custom lightbox gallery structure: I want to seperately be able to fetch the link and the image

I am trying to adjust the custom lightbox Wordpress Gallery structure into what I need for my layout. I want to insert a div inside the a-tag, on the same level as the img. By default, Wordpress uses $...
1
vote
0answers
46 views

Retrieve an array of image URLs that belong to a gallery

I am creating an image slider for the gallery post type. The code below works fine with the classic gallery, however when I use the new Gutenberg gallery block the get_post_gallery_images() function ...
1
vote
0answers
18 views

add action only if gallery shortcode attribute is equal to?

I'm customizing the gallery shortcode. Now, when the user clicks on edit button as shown below: We can see the gallery modal like below: In the right sidebar, we can see the gallery settings. And I ...
0
votes
0answers
17 views

How to stop echoing gallery inside content?

I want to completely stop echoing gallery inside the_content() because I am showing it in different position outside content as per design (with a help of get_post_gallery_images()). It is a custom ...
2
votes
2answers
187 views

get_post_gallery with Gutenberg

I have a site where I created a page that takes the gallery images from a post and puts them into a slider. I used the following code: // gets the gallery info $gallery = get_post_gallery( $post-&...
0
votes
1answer
14 views

Is it possible to make a user-specific gallery?

I want to make a website where everyone makes their own private/public galleries so that when they log into the website with their own account, they can find their listed galleries. If you have a ...
2
votes
0answers
57 views

How to return output of the new wp gallery block for automatically Link images To Media file

Sorry for the repeated questions but I didn't get any solution yet! I'm stuck with that!! I mange a multi writers blog, and all our users uploading some gallery images, and they didn't know the ...
0
votes
0answers
47 views

WP 5+ Automatic link all gallery images to media file

Before WP 5 I was linked all gallery images to "file" automatically by using this filter below. add_filter( 'shortcode_atts_gallery', function( $out ){ $out['link'] = 'file'; ...
0
votes
0answers
22 views

Using WP Attachments page as an slider

I'm working in case where you only retrieve 1 image of a custom structure gallery; then that only image will take you to attachments.php where I'm trying to get all the images of the that post in an ...
1
vote
0answers
72 views

Changing image size to full size in Gutenberg's block gallery

I'm using Wordpress 5.0 and I love it so far. The only problem I have with Gutenberg editor is that its "block gallery" doesn't work so well. I have some 4K screenshots in block gallery, but it looks ...
1
vote
2answers
22 views

Text lost under image after WordPress 5.0 upgrade

Right beneath the testimonial is the text <p>Tony (Property Manager)</p>, but it's overlapped by the WordPress 5.0 gallery that follows it. I don't think it's a float problem. Here: http:/...
0
votes
0answers
13 views

How to display all images “Uploaded By” an author

Similar posts have been made on this but not the same as I what I'm looking for. Ultimately I need a gallery to be shown on a page which displays ONLY the images uploaded by the user who is logged in....
0
votes
0answers
17 views

How to get attachments urls if text match?

Is there any plugin or code that can help me in this. I want to fetch images that have to include text in their file name that I mention on my page or in code. I mean I want to display all images if ...
0
votes
0answers
9 views

Custom JS Gallery problem

I handcoded some content (single html file with css and js insterted inside) for 16 tabs created using FusionBuilder (theme: Avada) on my site. Code is inserted via [Code Block] element inside the ...
1
vote
2answers
88 views

How to upload multiple image using wp_insert_post

Im using wp_insert_post to add products on the front end of a woocommerces site My current code will upload all the images but only the last image will be in the product gallery images heres my code;...
1
vote
1answer
43 views

How to get next image with this code from same post?

I want to show images in my single-content.php file. I have almost 20 to 25 images in every post. I want to print them with below code one by one. I have to change one line in code for every image for ...
0
votes
1answer
16 views

Gallery shortcode is empty but magically creates a gallery

I have a post with only this [gallery id="file"] in text editor but in visual, there appears a gallery. I was moving these posts and updating gallery ids automatically, but these posts don't have any ...
0
votes
1answer
106 views

How can I remove “<br style=”clear: both“>”

I want to customise my output of the gallery. What I really do not need is <br style="clear: both"> But it is there because I have to choice a number of columns during building the gallery in ...
1
vote
1answer
25 views

Strange issue with gallery when displays 3 columns

I have strange issue. I've create custom thumb sizes for Wordpress gallery. So this is my code in functions.php: add_image_size('square_thumb_1', 1136, 596, true); add_image_size('square_thumb_2', ...
0
votes
0answers
17 views

make post pagination with image from meta post

i have gallery post , with value post is image from meta post , and i want make this post like this fiddle but i dont know how to make it , i was try use this code <?php while ( have_posts() ) : ...
0
votes
0answers
22 views

Random photo size & arrangement for portfolio

I want me make my portfolio page to show different style when the user refresh my page. the picture will display different size randomly e.g. the square image will remain the square image but the ...
0
votes
1answer
224 views

How to Make Wordpress Default gallery responsive on mobile?

I have read about the subject in many blogs and forums but I have not achieved anything. What I would like to do on my page is the following: decalaveras.com On this page, when accessed from mobile,...
0
votes
0answers
54 views

Gallery Previews Not Working - wp.editor JavaScript API

When using media buttons on the wp.editor JavaScript API, The default "Create Gallery" functionality is available. Selection and editing of the gallery is working perfectly fine, however the gallery ...
0
votes
1answer
21 views

Native gallery custom html output

I've added image gallery to my page via Add Media > Create Gallery. I don’t want to output default html of the gallery, neither are sufficient options to change gallery sortcode's attributes: itemtag, ...
5
votes
1answer
724 views

Validation error: Extending Gutenberg gallery block

I am trying to extend the Gutenberg core/gallery block to add some new functionality to my image gallery on the frontend. I have created a separate plugin to handle this task. I have registered my ...
0
votes
0answers
69 views

Wordpress show descriptions under images in gallery

I’m new here. I was looking all over the Internet for a solution to show description under all images in gallery, I have found a plugin from Tom auger, but it was not compatible with wp new version... ...
0
votes
0answers
30 views

How to Change Default Image Gallery Size from thumbnail to full?

The code below is working perfectly in overriding my link to media file. But I can't seem to figure out how to change the default image size from thumbnail to full size. example: function ...
0
votes
0answers
7 views

Troubles updating my product images

I use the wocommerce pluggin. I'm having troubles updating my product images in all products. When I created the new product in the link bellow, I press the option to add a product image, I go to the ...
0
votes
1answer
110 views

Exclude first image from a Woocommerce image gallery

I would like to exclude the first image from the image gallery (this is not the featured image of the product) of a single product page in Woocommerce. I'm not an expert on PHP but, could an ...
0
votes
1answer
26 views

Getting Un Wanted Gallery Shortcode In The Page on Loop

I have a custom Post Type and I am running a regular WordPress loop in single-move.php page to display the textual content of the page only. now while the post has an image gallery I am getting the ...
0
votes
0answers
29 views

Combining multiple galleries (only 1 carousel)

On my page I have added two image galleries, mainly for optical reasons: because I want to have a quote between the two galleries. I am using the catch gallery plugin for image carousel. I would ...
1
vote
0answers
30 views

Can I have the same image in multiple NextGen galleries? [closed]

Is it possible to have the same image in multiple NextGEN galleries without duplicating the image? For example, let's say I have a gallery called "dogs" and a gallery called "cats". If I have a ...