Linked Questions

5 votes
2 answers

How to customize the default HTML for Wordpress Attachments

I'm using Wordpress 3.0.1 (most recent as of now) and working around the Whiteboard theme. It seems that for attachments (images, specifically), Wordpress generates the HTML automatically and it ...
jeffkee's user avatar
  • 173
2 votes
2 answers

Rewriting WordPress Gallery Shortcode with Bootstrap Carousel

In a recently personal theme project for publishing travel posts, I desired a slider-style image gallery rather than the standard column/list-style one WordPress uses out of the box. I like the look-...
Stephen S.'s user avatar
  • 1,019
1 vote
1 answer

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 ...
lesley n.'s user avatar
  • 113
1 vote
1 answer

Custom Gallery HTML only working when images are attached to post/page

I have changed my gallery html using the posts_gallery hook in the same way as shown here:How to customise the output of the WP image gallery shortcode from a plugin? I've copied the latest code from ...
Ralphonz's user avatar
  • 324
1 vote
1 answer

How to change the output of gallery shortcode

I would like to add the media description as a data-attribute to each image of the gallery. All the other answers favour the solution to copy the whole code from media.php to functions.php and change ...
Alex Maiburg's user avatar
0 votes
1 answer

Calling function from within functions.php returns unwanted value

I am trying to customize the output of the [gallery] shortcode to include comment count by this plugin: Facebook Comments for WordPress plugin I found a function by Zack Austin (shown below) that ...
jwp's user avatar
  • 169
0 votes
2 answers

Displaying comment counts in WP Gallery thumbnail view

Wordpress founder, Matt Mullenweg, has a great feature in his photo galleries. In thumbnail view, any photo that has a comment attached displays the comment count under the thumbnail. Look here (...
user avatar
0 votes
1 answer

How to move Wordpress gallery image out of the link?

I'm a newbie to Wordpress modifications and PHP in general and I need a bit of help. I've found a post here showing how to modify the native Wordpress galery output. Everything is allright but I can't ...
Daniel's user avatar
  • 181
0 votes
0 answers

3.9 Galleries & Thumbnails

I'm using WP 3.9.1 and have added a gallery (Add Media ->Create Gallery -> pick images -> Gallery Settings: Link to Media File.) That works, almost. The problem is that I need the gallery to use ...
RodeoRamsey's user avatar
  • 1,707
0 votes
1 answer

gallery image size

I have been looking for a couple of days for a filter for the WordPress gallery. I have tried many different codes but nothing seems to work for it. I am not using a plugin. I am talking about the ...
Jamie's user avatar
  • 1,363
0 votes
0 answers

How to get all images url from gallery? [duplicate]

I created gallery in my post (in my custom post type) and now I need to get url of images from this gallery in my template file. Does anyone know how to do it? Thx for your time.
Itachi's user avatar
  • 149