Skip to main content

Questions tagged [gallery]

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

219 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
6 votes
0 answers
246 views

Customize WordPress Media Manager - Media Window

Im trying to customize the wordpress media manager "add media" window to get it as simple as possible to use. So i want to disable/ hide the following fields/ functions because i dont need some or ...
public9nf's user avatar
  • 386
5 votes
0 answers
812 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,928
2 votes
0 answers
212 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
2 votes
1 answer
484 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
2 votes
0 answers
146 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 ...
Adham Mohamed's user avatar
2 votes
0 answers
268 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 ...
kacper3355's user avatar
2 votes
1 answer
60 views

Bulk image importing from folders

I have hundreds of different named folders with various amounts of images inside each. I uploaded the folders to the wp-content/uploads directory. How can I import all at once into the media library (...
jjredmond's user avatar
2 votes
0 answers
690 views

How to make a customized "Create Gallery" tab in the 'Add Media' window?

I'm developing a plug-in and wanting to make a customized version of the the "Create Gallery" tab of WP v4.0, but have the resulting output (i.e. what gets inserted into the TinyMCE editor) to be ...
mwKory's user avatar
  • 21
2 votes
0 answers
487 views

Reorder "menu order" of attachments to another predefined order

I want to show photos attached to a post in a gallery using the built-in system with a custom order. Currently with the [gallery] shortcode it is posible to order it by name, by upload date, by ID, ...
peroyomas's user avatar
  • 329
1 vote
0 answers
9 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
1 vote
0 answers
29 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
1 vote
0 answers
47 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
1 vote
0 answers
71 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
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
1 vote
0 answers
550 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
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
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
207 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
1 vote
0 answers
46 views

Unyson Framework doesn't show gallery images

I want to show post's uploaded images but it doesn't show... What am I doing wrong? $gallery = array(); if ( function_exists('fw_get_db_post_option') ) { $gallery ...
Nathan J's user avatar
1 vote
0 answers
85 views

Only column gallery on mobile device

I have a portfolio with a 3 column gallery in my Brix theme in Wordpress. The website is alanllontopfotografia.com But in mobile devices i see 2 columns, and i want to see the gallery item in one ...
sonia lopez's user avatar
1 vote
0 answers
3k views

How to create a gallery custom field for WordPress post?

I would like to create a custom field for WP posts that behaves like a Gallery Block (I can upload or choose photos from Media Library, and save data to this field). So that, on the frontend (in the ...
An Tran T.'s user avatar
1 vote
0 answers
73 views

Not Able to Get Custom Post Type Gallery Images URL

I have a CPT called books and I am able to loop through it like <?php $loop = new WP_Query(array( 'post_type' => 'books', 'tax_query' => array( array( 'taxonomy' =...
Behseini's user avatar
  • 525
1 vote
0 answers
383 views

Custom API endpoint to create gallery for post

I want to create a custom endpoint to upload images and create gallery as custom field for any post. I searched on codex but couldn't find a proper way to do this. Any suggestions or help?
kamer's user avatar
  • 11
1 vote
0 answers
46 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 ...
bostonHit's user avatar
1 vote
0 answers
32 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 ...
bortran's user avatar
  • 111
1 vote
1 answer
594 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> <...
Linh Nguyen's user avatar
1 vote
0 answers
270 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 ...
István's user avatar
  • 85
1 vote
0 answers
35 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 ...
Bhojendra Rauniyar's user avatar
1 vote
1 answer
70 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 ...
deep's user avatar
  • 11
1 vote
0 answers
304 views

"Scattered" gallery

I'm building a theme for a portfolio-type site. I'm looking for something like this: This site uses some kind of Foundation Grid CSS to size the thumbnails using different sizes. My question is, ...
leemon's user avatar
  • 1,928
1 vote
0 answers
576 views

how to link post-thumbnail to original img in a lightbox?

I have a page showing custom post type, but I don't know how to link to the full size image that can be opened by a lightbox plugin. the post page is like: <div class="content" id="main-content"...
Omid Akbari Kh.'s user avatar
1 vote
0 answers
1k views

how can I edit flexslider in woocommerce. [Urgent]

Can anyone please tell me how I can edit flexslider settings in woocommerce. I am actually trying to get this result. http://flexslider.woothemes.com/thumbnail-slider.html someone please help me ...
M.S Shohan's user avatar
1 vote
0 answers
238 views

Upload multiple images to a Woocomerce product

I am trying to upload various images from an URL to a given woocomerce product. The issue I am facing with my code is that, although I see that the images are being uploaded to the server when I go to ...
JordanBel's user avatar
  • 837
1 vote
0 answers
30 views

Ho to add "Create Slider" option to default "Add Media" popup?

What are the steps to create a custom "Create Slider" option in the default "Add Media" popup (the one used to insert images and gallery into editor)? The "Create Gallery" item should be below "Create ...
Oleg's user avatar
  • 135
1 vote
0 answers
51 views

How to create a gallery page with categories?

I'm a beginner in Wordpress theme development. I want to create a gallery page that have sorting feature to different categories. Here's an example page that I want to imitate. How do I go about ...
Long Nguyen's user avatar
1 vote
0 answers
68 views

Custom Attachment Caption Fields

I am looking to create a new field group in the gallery Attachment Details section. The field group would be called Project Tiles would contain the following fields: Caption Link (ideally this would ...
user2798841's user avatar
1 vote
0 answers
126 views

Hide Gallery from the_conent

I'm using a function to separate Featured Content. What I mean is that: if I selected format Gallery will show the First Gallery in my post , if I choose format Video , will show a video instead . ...
Locke's user avatar
  • 185
1 vote
0 answers
27 views

Activate Gallery Options in Media Uploader for Custom Usage

I am using "wp.media" javascript function for uploading media files. But how to active/add "Gallery" option for custom purposes?
Digerkam's user avatar
  • 219
1 vote
0 answers
95 views

How to make a gallery with dynamic images from URLs?

I have a link in my API that generates a list of URLs for some images. I want to display theses images in a nice gallery in WordPress. I couldn't find anything in the tutorials giving me hints on ...
Matheus Oliveira's user avatar
1 vote
0 answers
312 views

Wordpress Gallery shortcode with pagination

I would like to make simple gallery with pagination. I use this shortcode [gallery category="food"] I added an override to the function.php but the pagination not working. Listing all attachments. I'd ...
Pufimalac's user avatar
1 vote
0 answers
431 views

Get ORIGINAL image links from get_post_gallery

I use get_post_gallery( WP_Post, false ) to get gallery data because I build gallery HTML myself. However strangely it only gives list of ID's and list of thumb-urls. What is the best way to ...
jave.web's user avatar
  • 477
1 vote
0 answers
58 views

Inside text editor my preview gallery images are in full size

As I described in the title in the edit post page and inside the editor when I submit a new gallery the thumbnails are in full size. I suspect that this error caused when I unset the default "...
Cookforweb's user avatar
1 vote
0 answers
129 views

Extending Media Gallery - Retrieving values from short code

There are some existing questions that discuss how to add fields to the gallery dialog box and get those into the short code. What I want to be able to do is facilitate editing an existing short ...
Adam van den Hoven's user avatar
1 vote
0 answers
644 views

Modify how gallery.js builds the shortcode [gallery ...] in tinyMCE?

The post editor helpfully removes default arguments like columns="3" from the [gallery] shortcode. How do you tell it to remove a custom attribute that has a default value? The answer at Enhance ...
kitchin's user avatar
  • 271
1 vote
0 answers
271 views

How to run custom JavaScript code on gallery attachment image selection

On line 4620 of media.views.js is this: media.view.Attachment = media.View.extend({ ..... select: function( model, collection ) { ..... I would like to add some more features to this "...
dtbaker's user avatar
  • 357
1 vote
0 answers
251 views

How to add custom meta box under Gallery Settings in the "Edit Gallery" popup

I am developing a theme. I want to add option for the user to choose the type of the gallery which he is adding. Will it be a slider, masonry gallery or some other type. I cannot figure it out how ...
user43506's user avatar
1 vote
1 answer
226 views

Add Lightbox To WordPress Native Gallery

Is there a way to check if a gallery is linked to an attachment page or to an image file via jQuery or WP filter? I'm trying to add a lightbox to gallery image that is linked to image file. But I can'...
Andra Yogi's user avatar
1 vote
0 answers
327 views

How can I display an image description, from an image gallery?

I have a vanilla install of Wordpress 3.6. I'm using the Twenty Thirteen theme. I've created some galleries. On the individual image page, the "caption" is displayed below the image. I'd like to ...
okor's user avatar
  • 111
1 vote
0 answers
120 views

Adding shortcode field to edit gallery / Gallery Settings

I want to add a field to the Add Media / Edit Gallery / Gallery Settings column which is able to accept shortcodes. I want to do this so that I can add a Cart66 shortcode which will "render" an add ...
Seb Syd's user avatar
  • 11
1 vote
1 answer
364 views

Way to add captions to gallery images by code

I am creating posts by using wp_insert_post function. It works fine as I provide values in array required. Sometimes it is required to create a post having gallery. Without any problem, it also works ...
10wtaylor's user avatar
  • 315

1
2 3 4 5