The gallery tag has no wiki summary.
9
votes
2answers
2k views
Turn a URL into an Attachment / Post ID
Is there any way I can take a URL of an image and find the attachment or post id of that image in the database?
Here is the situation:
I'm in a loop going over all the 'img' tags that are surrounded ...
8
votes
9answers
1k views
Creating a photo gallery in WordPress
At times I've tried a few different solutions for a WordPress-powered photo gallery. There are lots of options, including plugins and custom post types. Theme matters a lot, here. ma.tt has a pretty ...
8
votes
1answer
151 views
ZIP up all images displayed in a [gallery] and offer as download link
I would like to offer my visitors the option to download the entire photo gallery (displayed on dedicated [gallery] pages) as a ZIP file displayed at the bottom of each gallery page. - The full-sized ...
6
votes
2answers
7k views
How to manually fix the WordPress gallery code using PHP in functions.php?
It's been talked many times that Wordpress outputs some really bad code for the built-in gallery function.
This is the core code responsible for the gallery output (in /wp-includes/media.php):
...
6
votes
1answer
749 views
Make a really simple gallery structure
The default gallery structure of WordPress is really tortuous:
<div id="gallery-1" class="gallery...">
<dl class="gallery-item">
<dt class="gallery-icon">
...
6
votes
4answers
3k views
How can I alter the [gallery] markup?
I would like to change the markup created by [gallery] from what is it as standard (dl) to a unordered-list with a difference. Below is the desired markup:
<ul>
<li><a ...
6
votes
1answer
349 views
Gallery Inside One Post
For image galleries, I need a code that uses next/previous links to bring you to the next/previous image in that post and keeps the images in the correct order you chose while inserting them into the ...
6
votes
1answer
434 views
Any way to add custom options to Gallery Settings?
Now that Wordpress has updated to version 3.5, the media gallery has been overhauled and this custom options solution doesn't appear to work anymore. I'd like to add a couple of fields to the gallery, ...
6
votes
2answers
162 views
Use a separate custom table (not posts) to handle file upload data
The Problem:
Website that has over 100 photos per post. Could possibly swell posts-table beyond 100K entries within a few years.
The Dilemma:
Would much rather stick to default WP UI for handling ...
5
votes
1answer
2k views
Check if post/page has gallery?
I'd like to run some code only if a gallery (inserted with the [gallery] shortcode) has been inserted into a post/page. I did the following:
gallery_shortcode($post->ID) ?
$gallery = 1 : ...
5
votes
3answers
281 views
WP 3.5 and Galleries - how to count images?
I'm trying to figure out how to count and display the number of images in a gallery with WP 3.5. I was following an old post on Ottopress, querying the DB for attachments but it seems the galleries ...
5
votes
1answer
979 views
Add existing images from Media Library in to custom gallery
I have [gallery] inside the post, and I'm interested in a way to add already existing images from media library in to this gallery? once I trying add any image I have only one option - insert into ...
4
votes
2answers
12k views
How to customise the output of the WP image gallery shortcode from a plugin?
We're building a plugin that displays posts, and we also want to display the image gallery when it is used in a post. However, we need to limit the number of photos displayed? Is that possible?
4
votes
1answer
324 views
What is the action hook for save media-form on gallery tab?
I want to save a meta data to post parent when the media-form on gallery tab is saved( The submission button is "Save All Changes"). Which action hook can I use?
4
votes
1answer
183 views
Navigate with keyboard in Gallery shortcode
I am using Wordpress Gallery shortcode and I was wondering if there is a way to navigate using the arrow keys? Like if I view an single image and used the right arrow to navigate to the next image in ...
3
votes
2answers
1k views
Adding jquery and thickbox to wordpress theme
I would like to add thickbox for the template which I develop to wordpres. At this time I'm trying with a clean template that have only header.php footer.php index.php and functions.php
I've included ...
3
votes
2answers
1k views
How do you modify the HTML output of a Gallery item (using the gallery shortcode)?
Im a bit lost on this simple problem so i thought id come and ask the pros. Ive just been told by my client that on their sites gallery, the name and description are on the same line.
so for example ...
3
votes
2answers
282 views
Two embedded gallery in one post
I've a nice question for you.
Is there an easy way, to embed two galleries in the same post? I refer to the wordpress embedded gallery. Using a plugin of-course.
Is there outside a plugin other than ...
3
votes
3answers
5k views
Load entire NextGEN gallery from single thumbnail?
I'm using Alex Rabe's NextGEN Gallery in a lot of client sites as a centralized image repository, and am finding I often need to load an entire gallery into a lightbox (invoked via a single ...
3
votes
2answers
259 views
PHP/Manual use of images? - 2 Questions
I've made a quick PHP script/page that uses the wp_insert_post() function to insert a post directly. And this works great. The post I am manually adding has an image in it, so I firstly ...
3
votes
1answer
334 views
get images from post and make a zip
here is what i have so far.
function zip_gallery()
{
global $post;
$images = get_children(array('post_parent' => get_the_ID(), 'post_type' => 'attachment', 'numberposts' => -1, ...
3
votes
1answer
2k views
Can I load posts via Ajax?
I would like to make a portfolio page where each entry (a post) would be fetched using Ajax.
This way I would have an image gallery, but in which I not only would have images but also the ...
3
votes
1answer
350 views
How to call WP3.5 Media Library manager?
In the past Media Library window could be called like this:
tb_show("Upload image", "media-upload.php?type=image&TB_iframe=1&width=640&height=520");
This still works in WP3.5. But I'm ...
3
votes
2answers
576 views
add_filter and changing output captions of image gallery
I'd like to change only one output of native WP Gallery (in media.php)
On Smashing Magazine (link) author advises to change whole gallery_shortcode function.
But I wondered if is possible to change ...
3
votes
1answer
976 views
Use Media Library to manage galleries like Nextgen (with folders, albums, collections, tags, categories, terms…)
I'd wish to use WP 3.x standard Media Librery rather than relying on 3rd party plugins like NextGen no matter how well they're written. I just don't like duplicating functionalities.
Media Librery ...
3
votes
2answers
401 views
how to test for attached image
I am trying to find out whether or not a post has images. If it does, I then want to know if a featured image was specified for the thumbnail - if not, the get_thumb() function will assign an image ...
3
votes
1answer
349 views
How to make a page template to list all galleries?
I'm trying to code a theme where I'll have a universal gallery page. Basically like:
http://www.engadget.com/galleries/
However I'm at a loss for what I'd use to call all the galleries. I need the ...
3
votes
1answer
154 views
how do i create a downloadable gallery with image descriptions?
I am creating an educational site for medical students using wordpress and would like to have an image gallery that displays a short description of each image and has a selection box beside it (as ...
3
votes
1answer
203 views
How do i link gallery thumbnails to different url's using the wp native gallery?
Is it possible to link each gallery thumbnail if i use the built in WordPress native gallery?
3
votes
1answer
505 views
How can I remove or change a border/outline on a picture when it is in a gallery page?
You can see on this page: http://www.middlegray.net/ceremonies/
the photos have a white box that is automatically applied to the pic. I want to take it off or make it a different color. Where would I ...
3
votes
1answer
402 views
Build path for a custom portfolio plugin
I'm finishing up a personal site that I've spent many weekends on. I've left one of the (potentially) most complicated parts to the end of production. I'm looking for some advice on how to proceed ...
2
votes
3answers
660 views
WordPress gallery 'post_gallery' filter doesn't work with feeds?
We can use the post_gallery filter to modify/replace the default WordPress gallery template (AKA output code) to suit our needs. But this doesn't seem to affect the markup in RSS feeds.
No matter ...
2
votes
2answers
368 views
Wp3.5 Media Gallery Edit modal: change captions to title
How can i change those editing inputs to title from caption?
Some sources i found about new upload system:
Using the WordPress 3.5 Media Uploader within plugins
How to Add the WordPress 3.5 Media ...
2
votes
3answers
143 views
Remove [gallery] shortcode altogether
I used remove_shortcode('gallery'); ...the gallery is gone, but the shortcode is visible in the text. How do I remove sitewide? I've searched for sql queries, but no solution fixes my specific ...
2
votes
1answer
411 views
First three images in post excerpt
I have certain posts that are nothing but [gallery] with quite a few images in them. Is there a way to define an auto generated excerpt to only display the first three images for these posts on the ...
2
votes
3answers
341 views
How can I show these pictures in two columns in my page?
This page is long and cumbersome. I am trying to find a plugin/hack that would put the images on this page in two columns to make it a bit easier to digest. Removing the <p> tags doesn't seem to ...
2
votes
3answers
455 views
What is a good way to implement photo galleries on Wordpress?
I want to publish about 1GB of photos on my Wordpress-powered website. I want viewers to load the photos quickly, but also tobe able to download high-resolution versions.
Here is what I have tried.
...
2
votes
2answers
145 views
Storing image gallery plugin data
I'm making image gallery plugin and I'm not sure what is the best way to store data in WordPress. Plugin can contain multiple gallery instances with some options and each gallery contains images with ...
2
votes
5answers
3k views
Media gallery - inserting full size images without link
I want to use built-in WP media gallery. I'm trying to simply add images in one - horizontal line. I want images with original size and without any link. I'm trying to add/edit some code into ...
2
votes
2answers
154 views
Display latest 10 galleries
I want to create a custom page that will display let's say 20 latest galleries / page - but only the first image from the gallery, not all of them. something like this: ...
2
votes
1answer
1k views
Retrieving a custom link on an attachment
I wanted to link images in a gallery to a custom URL.
I know I could add an extra field and do it this way
I found this ticket on Trac, though, that modifies the "Link URL" field to accept custom ...
2
votes
1answer
2k views
Gallery set to “Media file”, showing as attachment page
I am using WP 3.5.1 and lightbox plus 2.5.5
I have my lightbox set to "Use for WP Gallery"
Lightbox is working successfully on one of my posts with a single image, but on another post I have 3 ...
2
votes
3answers
207 views
get attributes/part of the gallery shortcode
I'm trying to grab all image id's that are associated with the [gallery] shortcode that are listed as exclude. For example: if my post has [gallery exclude="1,2,3"] I'd like to get a variable that ...
2
votes
2answers
97 views
Looking to display non-image files in Gallery with logo specific to file type
When I first began looking into this, File Gallery got me much closer to solving the problem. The only issue is that the plugin only displays the generic non-image icon when I upload a file.
Does ...
2
votes
1answer
357 views
The WordPress Gallery, Grabbing The Link and Images?
I have created a template for gallery named image.php which allows me to create a news website style image gallery that can be embedded in posts. But I need two more things to make this complete.
...
2
votes
3answers
587 views
Gallery Shortcode: using link attribute to link to a specific image size
When [gallery link="file"] is used, it calls the original image file source.
It it possible to create a shortcode filter that links to a specific size, like:
[gallery link="medium"]
or
[gallery ...
2
votes
5answers
1k views
Insert into Post button is missing for certain images
I thought I was crazy, but on some of the images in my media gallery, there is no "insert into post" button. see the picture:
this is only for some images though, and the button is there, like ...
2
votes
2answers
125 views
show other images from same gallery
suppose you are viewing a single image from the gallery. You have both previous and next links there (for navigation).
but
is there a way to also show all the other images from the same gallery in the ...
2
votes
1answer
56 views
Attach custom gallery to a page
I am developing my first WordPress website and am trying to find a way to do the following. Website editor needs to be able to create image gallery pages by attaching multiple images with metadata ...
2
votes
2answers
185 views
Gallery Only Displaying One Thumbnail
My image galleries are showing only one thumbnail in the post the gallery sits in. http://themeforward.com/demo2/2013/03/08/image-gallery/
My single.php markup can be found here: ...
