Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [gallery]

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

Filter by
Sorted by
Tagged with
0 votes
1 answer
25 views

Adding a css class to the gallery

I'm using WordPress 6.5 with the old editor, I'm trying to add a CSS class on the div gallery when it specified in the shortcode, the code doesn't work, can you help me ? function custom_gallery_class(...
Barrista's user avatar
1 vote
0 answers
8 views

After moving content to a new site, gallery thumbnails are not pointing to media files

I am moving content from an old site based on Wordpress 4.9 to a new website based on the current release and PHP 8. I have moved all the content - meaning posts, pages, media, and so forth - using ...
Ondrej's user avatar
  • 111
0 votes
0 answers
7 views

WP galleries in posts after import. How do I do it?

I moved the website posts with Wp All Export and All import, which worked fine, but many of the posts contained galleries (Wordpresses gallery with [gallery] shortcode). The problem is that now the ...
vicartdesign's user avatar
1 vote
0 answers
27 views

Issue migrating galleries has created shortcode with urls rather than IDs - any fix for this?

I've had to rebuild a site from scratch on a new platform, everything has worked fine using a mix of the built in import/export tools and WP All Import/Export. The only issue I'm facing is with the ...
James Dobson's user avatar
0 votes
0 answers
16 views

Image shows up in editor, but not in published blog post

I'm having a problem with my blog page. I'm adding images to my blog posts and I can see them on my back-end however, not in the published blog post. Am I doing something wrong? example page is: https:...
Lina's user avatar
  • 1
0 votes
0 answers
22 views

Galleries are limited to 12 images

I have used the wordpress gallery for my posts. with 10-40 photos per gallery. Since today, however, only exactly 12 photos per gallery are displayed in the all the posts on my website. (although I ...
Beat's user avatar
  • 1
0 votes
1 answer
444 views

Uploading images via ACF update_field function

I am trying to update image fields within a group in ACF via the update_field function I am successfully adding the images to the media gallery but I am having trouble getting them added to each ACF ...
grzybowski1911's user avatar
0 votes
0 answers
46 views

Dynamic Gallery: Worpress' equivalents for Wix's collection and repeater

I am recently trying WordPress (the WordPress.com one instead of WordPress.org) to create a webpage that displays a list of events that the website visitors can participate in. I have been using Wix ...
mawgumelar's user avatar
0 votes
0 answers
119 views

Show an ACF gallery in a lightbox with thumbnails nav

I used "Foobox" plugin to show a ACF gallery (hidden) start from a single image. Here is the code used if ( have_rows( 'lsv_prodotto' ) ) { while ( have_rows( 'lsv_prodotto' ) ) { ...
Claudio Mattioni's user avatar
0 votes
0 answers
40 views

Wordpress Gallery only allowed 10 times per post

I am trying to use the gallery shortcode multiple times within a post, two images per gallery, 15 shortcodes per page. It will only work as expected with modal popup for the first ten iterations, the ...
commbot's user avatar
0 votes
0 answers
9 views

How to add more images horizontally to existing gallery using elemontor

I deleted all my unattached images from media as I had so many copies not being used and now I'm missing all my images in my gallery. The grid is already there so it should only be to upload add the ...
Johanna's user avatar
1 vote
0 answers
45 views

Change display size of one image in a Gallery block

I'm new to Wordpress. I've created a simple blog site, pretty much just out of the box, latest 6.2.2 version. When I create a post, it uses the block editor. When I create a Gallery block, and add ...
Sandra's user avatar
  • 111
0 votes
1 answer
43 views

Gallery Block in template, validation fails after adding column number

I have set up a template in a block like so: const TEMPLATE = ['core/spacer', {height: '100px'}], ['core/gallery', {templateLock: 'false', columns: 2}] ; const ...
Fou Rorty's user avatar
0 votes
1 answer
92 views

Trouble with Wordpress Gallery since update using has_block('gallery'

I've got a custom post type setup which displays a gallery below the hero. It's setup to display the first 9 images in a gallery using the following code, when one clicks the "View All Photos&...
Art in Flight's user avatar
1 vote
0 answers
69 views

Theme.json_ Set default columns for gallery

I want to set a default number of columns for the gallery block within the theme.json-file. Is that possible? I couldn't find anything regarding this. I tried some things under settings "blocks&...
Fou Rorty's user avatar
0 votes
1 answer
395 views

Custom Gallery Block - Uncaught TypeError: setAttributes is not a function

I tried building my own custom gallery gutenberg block as shown here to get more familiar with the block structure. Putting all the code into a single file works fine, but when I try to split it up in ...
Fou Rorty's user avatar
0 votes
1 answer
44 views

WordPress default gallery pagination when in page (is_page)?

It seems I have found the way to make WordPress default gallery pagination to work and to have control over URL forming: Pagination with WordPress default gallery? But when gallery call is in post. ...
BonMoDo's user avatar
  • 11
0 votes
0 answers
138 views

Delete images from media library when user deletes an image from ACF Gallery

When a user deletes an image from the gallery in wp-admin I need it to be deleted from the media library too. I have a function using the acf/update_value hook which works uncorrectly. When a user ...
Da Markuzz's user avatar
0 votes
1 answer
506 views

Custom default settings for WP native Gallery Block

I've started with MarkJ's answer - JavaScript included into the block editor. I wanted to control more attributes for gallery than linkTo — the number of columns, cropping, and image size. wp.domReady(...
Rafiozoo's user avatar
2 votes
0 answers
211 views

WordPress Block Variation for Gallery Columns

I had this code to extend the column count to 10 for a specific need. wp.blocks.registerBlockVariation('core/gallery', { name: 'prefix-gallery', title: 'Custom Gallery', attributes: { ...
Shawn M's user avatar
  • 21
1 vote
2 answers
444 views

Media changes not updating posts

What happens: Write a post Create a gallery Upload a random picture Set caption to "test" Publish Post Go to Media -> Select the picture from before Set caption to "changed" ...
CasualBen's user avatar
  • 123
1 vote
1 answer
284 views

Pagination with WordPress default gallery?

Here is the part of code handling pagination in functions.php: // Pagination Setup $current = (get_query_var('paged')) ? get_query_var( 'paged' ) : 1; $per_page = 3; $offset = ($current-1) * $per_page;...
BonMoDo's user avatar
  • 11
0 votes
1 answer
342 views

How to get all attachment image from post ?? WordPress

I just want to get all atachment image from post with Alt, description, title, size, resotution and how to add DOWNLOAD button? i want to create image downloading website on wordpress for example LINK ...
SauRav's user avatar
  • 5
0 votes
1 answer
1k views

Allow users to upload and display multiple photos

So basically I have a social website and I want for Wordpress users to be able to upload pictures and display them on their front end profile page. I have been looking into the user submitted ...
robert0's user avatar
  • 203
0 votes
0 answers
324 views

How to change Gallery image url in product page ? In function.php?

My code is like add_filter('wp_get_attachment_url', function($url){ if(strstr($_SERVER['HTTP_ACCEPT'], 'image/webp')!=false){ return $url.".webp"; }else{ return $url; ...
Harvey Wang's user avatar
0 votes
1 answer
274 views

How to get the Gallery form/section just like in Gutenberg block?

I am making a custom php page in wp-admin and required to upload multiple images and display it after upload and select images to display. Basically I would like to have the same effect as in Image ...
murni's user avatar
  • 37
0 votes
0 answers
85 views

How do you obtain a list of all image file names on a wordpress website for replacement?

Good Day, I hope somebody can assist me please. I have to replace/re-upload all the images on a website, as they were uploaded as massive files. I have to downsize all the images, and want to know if ...
Zenith7 Productions's user avatar
0 votes
0 answers
75 views

Display metabox galleries on specific page template in admin editor

I'm building a Wordpress website with two metabox galleries displayed only on post type page in admin editor. What I'm trying to do is to display them only for a specific template page in the admin ...
Mathieu Préaud's user avatar
0 votes
2 answers
672 views

Implementing a modal(lightbox) for all images in all post-gallery posts

I'm trying to make a photo gallery page for all my photos in my post-gallery post and have a modal open when you click on the photos. In the page there will probably be almost 100 photos and i'm not ...
Jomeb's user avatar
  • 1
0 votes
0 answers
61 views

Pre-load images into a new users media gallery

After a user registers on my site, I send them to a form where they create a product listing that requires a featured image. Is there a way for me to have images pre-loaded into a new users media ...
Jack01671's user avatar
0 votes
0 answers
223 views

Render metabox gallery in frontend

I'm building two metabox galleries on the same page with the help of a tutorial. The code works fine. However the galleries are automatically displayed after the content on the front end. What I would ...
Mathieu Préaud's user avatar
0 votes
1 answer
257 views

How can I add hover text to images of a basic gallery on wordpress elementor?

I have a basic gallery of images. I want to add a caption that is only visible on hovering over the images of the gallery.
Vaibhav Sharma's user avatar
0 votes
0 answers
22 views

a SET of wordpress native galleries with title and text?

How to make it in the simpliest way ? see graphic structure, -a SET of items in wordpress page -and EVERY item is: one gallery (the best solution -> wp native gallery) on left, with title and ...
TralaT's user avatar
  • 11
1 vote
0 answers
544 views

How select multiple document as like media gallery

I want to make a document(.pdf) gallery with multiple selections exactly like the image gallery. So that when I click on a button or something wp.media selection frame will be popup and can select ...
Razon Komar Pal's user avatar
0 votes
1 answer
398 views

Customise the WordPress gallery html layout

I want change the WordPress gallery html layout, By default, the output of HTML is as follows: <div id="gallery-1" class="gallery galleryid-184 gallery-columns-3 gallery-...
och's user avatar
  • 39
1 vote
2 answers
479 views

Target WooCommerce Product Gallery Image (rather than Featured Image) for og:image

I'm using the following code to set my Open Graph meta data in functions.php It works great for selecting the featured image, however I would like to set it to use the product gallery image instead (...
Daniel's user avatar
  • 21
1 vote
2 answers
329 views

WP Filter to change the URL of an Anchor wrapping the last gallery image

We have a normal WordPress gallery on a development webpage. The page is custom content through Advanced Custom Fields, and we are wrapping the section above's content like so: <?php $content = ...
SRDMH's user avatar
  • 75
0 votes
0 answers
29 views

How to get all id_attachment with one loop?

I have some lines of code which shows the url of my wordpress image gallery by means of an id, but I need it not to have to be selected by me, if not that every time an image is added, it is not ...
Joel López's user avatar
1 vote
0 answers
25 views

Media Gallery Upload photo incorrect way like glitch

I start having this issue like 3 days ago, I disable all plugins but nothing works. See the examples: Original photo: after I upload:
z00x's user avatar
  • 11
2 votes
1 answer
478 views

How to get Gutenberg Gallery Block to output thumbnail images?

By default, the Gutenberg Gallery Block outputs full size images in 3 columns. This is excessive, especially on mobile, so I would like to set it in the theme or function file to output thumbnails. ...
Neil Hillman's user avatar
3 votes
2 answers
2k views

How to include externally hosted images into a gallery block

WordPress has a really great native gallery function. The only downside I find is that it requires you to have the images on your domain. We have a blog for fun, and a very cheap hosting plan. Which ...
Luuklag's user avatar
  • 87
1 vote
0 answers
22 views

Customizing the attachement page to show rest of all images in a gallery from post

How to customize the attachment image page with previous and next navigation button and show below rest images in a gallery ? I just added a visual representation Post page Attachment page
Sreerajdesign's user avatar
1 vote
0 answers
205 views

Split loop to load WordPress gallery into Bootstrap modal and carousel

I have created WordPress coding to loop through gallery images from a post, create a thumbnail gallery display in two cols (that resizes to one col at the mobile size, since the default WordPress ...
jtm2012's user avatar
  • 11
5 votes
0 answers
808 views

Is there a core Sortable component in Gutenberg?

I managed to somewhat replicate the product gallery metabox from WooCommerce in Gutenberg using the third-party react-sortable-hoc component. As it seems that this component is no longer supported, I'...
leemon's user avatar
  • 1,918
0 votes
1 answer
249 views

how automatically show the image title before the image caption/description in a wordpress gallery?

I am using a simple Wp 5.x gallery like this [gallery size="full" columns="1" ids="6304,6305,6306,6307,6308,6309"] The gallery shows me the images and the captions/...
Waldemar's user avatar
0 votes
1 answer
39 views

Images getting smashed

I am developing a web site and I have encountered a problem regarding images and galleries. Images are getting smashed whenever you enter the page, once you refresh a couple of times, it gets fixed ...
Daniel Robledo's user avatar
0 votes
1 answer
26 views

Making the caption & click through link more visible on a gallery photo

I need help with the standard Image Gallery in Wordpress. My aim is to have a custom click through (to another WP page) for each photo. I have managed to do this by inserting the URL into the name of ...
mVentures's user avatar
0 votes
1 answer
192 views

How Do I Prevent An Image From Automatically Adjusting In Guttenberg Block Gallery?

I am trying to implement a Gutenberg gallery with 10 images with a 4 column gallery. The first two rows coming fine with 4 column images each row. But the issue is that the last row, which has 2 ...
MACMAN's user avatar
  • 101
0 votes
1 answer
80 views

change the h3 subtitles of the wordpress gallery shortcode

When I create an image gallery in a WordPress entry with shortcode [gallery] and put their titles on them, they appear in H3 Any way to change them to be on h4? Example of a gallery image created in ...
juan's user avatar
  • 1
0 votes
1 answer
311 views

making wordpress gallery responsive

I'm using a 4 column native wordpress gallery on my homepage: https://www.peace-ed-campaign.org/ (see just below the slider). When viewed on mobile, the 4 columns/images remain side-by-side and shrink ...
pttony's user avatar
  • 1

1
2 3 4 5
16