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.

0
votes
0answers
11 views

Add editable image gallery only

I made a static website for client which works fine. He came back and asked if i can create another page on this website where he can add photos of his business. So it will be a image gallery. What ...
1
vote
0answers
11 views

Bootstrap card columns change images size

I have a bootstrao masonry grid made using the card columns technique. The images that will be part of the grid are all of the same size and this will not give the desired masonry like effect when the ...
0
votes
1answer
8 views

Javascript Tab Gallery with Advanced Custom Fields

I'm using Advanced Custom Fields on my site, i want to display pictures for my gallery field on a presentable, elegant way. So i was thinking on do something like this: https://www.w3schools.com/...
0
votes
0answers
11 views

Getting gallery instead of single attachment

I'm working on a template right now. At the moment I'm trying to work with a regular gallery as given by Wordpress. But instead of getting only an attachment by clicking on an image, I want to get the ...
0
votes
2answers
29 views

wp_editor in add_meta_boxes does not show gallery

I have added a meta box in the page edit section: add_meta_box('custom_section_box', 'Sections', array($this, 'section_box'), 'page','normal','high'); Within the box, there is a wp_editor call: $...
0
votes
1answer
51 views

Advanced Custom Fields Gallery and Flex Slider [closed]

I want to display the gallery with Flexslider like in the tutorial here: https://www.advancedcustomfields.com/resources/gallery/ So i went to the Flexslider site and followed the steps: https://...
0
votes
0answers
15 views

How to display the list view in media gallery modal?

WordPress has the Grid View and the List View for the Media Gallery. Sadly I can't see the List View in the Media Gallery Popup Window, when inserting media into content. I've searched the web for an ...
0
votes
0answers
11 views

Show a few selected photos in post listing

Is it possible to have a post in the home page list show a select few thumbnail photos in a gallery, then have the entire gallery on the single post page?
0
votes
1answer
12 views

Add Index to Item in Wordpress Gallery

I'm creating a gallery of images using the [gallery] shortcode and Jetpack's tiled gallery feature. When the user clicks on an image I'm triggering a carousel (Owl Carousel) with carousel.trigger( 'to....
0
votes
1answer
11 views

How do I show the HTML descrption in wordpress photo gallery for my individual gallery pages?

Using the wordpress gallery below, I want to show the html content of an anchor tag so that when I click on a link to get to a specific gallery I will navigate to the anchor tag in the description ...
0
votes
1answer
27 views

How to Enable embedding Wordpress default gallery in comments?

I want to embed WordPress default gallery in comments which has embed code like this: [gallery link="file" columns="2" size="medium" ids="1,2"] To do so, I added this code which enables shortcodes ...
0
votes
0answers
20 views

Add class to latest item Woocommerce

I need to woocommerce product gallery add class in latest item, if more than two pictures in the gallery do no need add the class to the last element, but if there are more than two images in the ...
0
votes
0answers
13 views

Create slideshow from default gallery

I have a question. Is there any way, it does not matter if it' s code or plugin, to create slideshow from default Wordpress gallery. E.g. I am working on a website that has 5000+ articles. They' ve ...
1
vote
0answers
17 views

Custom icons in media library

I'm trying to replace some icons for files in the media library based on the file-name / file-path. I want to give each file that contains the filename "example-name" a different icon in the media ...
0
votes
0answers
15 views

Can I nest a <figcaption> element within <a> tags from default wordpress?

I am making a page with Gutenberg but there is a problem that the link does not work within a . This is the code when I inspect: <figure> <a href="..."> <img> </a> <...
0
votes
1answer
46 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
14 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
19 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
19 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
28 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
18 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
39 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
14 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
24 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
52 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
9 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
10 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
24 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
20 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
151 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
11 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
55 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
21 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
522 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
65 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
73 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
23 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
103 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
25 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
14 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
11 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
167 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
46 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
162 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 ...