Stack Exchange Network

Stack Exchange network consists of 174 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.

0
votes
1answer
15 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
15 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
17 views

Plugin to allow for these features [closed]

I'm looking for a gallery plugin which would support the following features: Be able to structure photos and videos in albums and galleries (galleries contain images and videos, albums contain ...
0
votes
0answers
8 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
31 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
14 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
16 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 ...
1
vote
2answers
40 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
10 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
37 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
28 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
18 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
46 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
21 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
12 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
6 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
35 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
39 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 ...
-1
votes
0answers
20 views

baguetteBox with wordpress

I am using baguetteBox with WordPress and I have an issue and I can't get where the problem is. Every time the page load, I click the first image and it works well and it opens in the popup the modal ...
0
votes
0answers
6 views

Add Field Group to Posts if their Category has a specific meta value

I have an ACF field in category that marks it as gallery or normal category. What can I do in the system/admin so that any post that I add under a gallery category would become a type=gallery post? ...
0
votes
1answer
15 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
48 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 ...
0
votes
0answers
13 views

Gallery only displaying the thumbnail picture

When we click to view a full gallery it just shows the full-screen version of the thumbnail. This problem began after we updated our plugins, but I tried deactivating them one by one and the only one ...
1
vote
1answer
21 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
22 views

Remove [gallery] shortcode and print html

When create new gallery from "Create Gallery" in Media into a plugin I need remove the shortcode [gallery ids="...,..."] that it print after loading and selecting photo action in text editor with a ...
0
votes
0answers
13 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
18 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
135 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
19 views

Is there a way to let users download images from a gallery?

What is the best way to let users download images from a gallery? I tried using the NextGEN Gallery plugin with the download addon plugin, but it looks horrible on mobile devices. Thanks again, ...
0
votes
0answers
48 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
17 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, ...
4
votes
1answer
398 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
63 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
28 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
0answers
12 views

Photogallery preview (NextGEN Gallery)

I would like to ask you for a little help. The client wants a photo gallery on his website with a few abilities (auto image downsizing, multiple files uploading etc.) I found a NextGEN Gallery as the ...
0
votes
1answer
81 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
24 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
27 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
27 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 ...
0
votes
0answers
19 views

WooCommerce - How do I make it so that selecting an image also selects the equivalent option in the dropdown?

I am trying to find a plugin/configuration setting that does the following: if a user clicks on an image from the product gallery then the equivalent setting in the dropdown variant selector is chosen....
1
vote
1answer
45 views

Get attachments but only from post gallery?

I can get post attachment images it is ok. But i want to get attachments from only post's gallery? Is it possible? Here is my code: global $post; $id = $post->ID; $post = get_post($post); $images ...
0
votes
0answers
44 views

How to create a gallery output with pagination?

I'm using the get_post_gallery to output all of my images on index.php. I want to use masonry + infinite loading with it but infinite loading requires to have a next page. The code I'm using doesn't ...
0
votes
0answers
41 views

wpdb query to insert images in to post/page gallery

Can someone please help me find a way to insert images in to a post/pages photo GALLERY with a database query. I am currently using a function to insert images into the database and give them a parent ...
0
votes
1answer
62 views

Get caption from unattached images in gallery?

I've created a slideshow that automatically populates with images included in a post's gallery, and I want to display each image's 'caption' field as well. I'm currently using ...
0
votes
2answers
60 views

How to get images using taxonomy ( WP Media Folder)

How would one go about creating a gallery page which is a gallery of galleries - using a specific photo from the subgallery as a cover for the album? This is what I have so far. I have a folder on ...
0
votes
0answers
17 views

Can't use gallery images as attachment for post

I am creating image gallery in wordpress post edit screen. And set link to: attachment page but when i click any image it goes site.com/1.jpg but it must go site.com/post-title/1.jpg
0
votes
1answer
33 views

Can't get the columns of galleries when the user set the column number to 3 if there are 2 galleries?

I'm detecting if the user has a gallery in his post: $gallery = get_post_gallery( $post->ID, False ); $gallery_images = explode( ',', $gallery['ids'] ); And at times I'd like to see how many ...
0
votes
0answers
17 views

uTubeVideo Gallery: How to add videos to video album

Probably really a dumb question. But I am not getting the installation instructions for the uTubeVideo-Gallery. How do I 4. Create video albums for gallery just created. 5. Add videos to video album ...