The tag has no wiki summary.

learn more… | top users | synonyms

1
vote
1answer
1k views

How to remove title attribute from gallery links and images

I want to remove the title attribute from within the output of a [gallery] shortcode e.g. <a href="url" title="bobby"> <img src="url" title="bobby"/> </a> should be: ...
0
votes
1answer
16 views

How to add an easily administrable photo slider? [on hold]

I want a post type to be just a photo slider, each one with a caption. I already coded a nice JS slider on my theme using get_attached_media('image'); since I don't want the editor to mess with ...
0
votes
1answer
22 views

Possibilities for customising the standard wordpress gallery?

I am a photographer with a Wordpress site so as you might imaging I need to show off my work in it's best light. I love the wordpress gallery because it creates great SEO due to the comments ...
1
vote
1answer
270 views

How do I delete all UNUSED images from my uploads directory?

I am trying to clean out my uploads folders as they are now starting to take up too much room on my server. I have tried to use plugins to achieve this end such as DNUI and Cleanup Images but these ...
0
votes
0answers
13 views

Get URL value from 'ATTACHMENT DISPLAY SETTINGS'

How do I get the URL from the 'ATTACHMENT DISPLAY SETTINGS' > 'LINK TO' secion of the media upload when listing attached images using the following code. <?php $args = ...
0
votes
0answers
15 views

I cant get archive-gallery.php for custom post types

Hi to all I have just created a gallery with the codes below: //---------------------------------------------- //----------register and label gallery post type ...
1
vote
0answers
20 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 ...
3
votes
2answers
830 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 ...
0
votes
2answers
602 views

Insert wp gallery shortcode into custom textarea

Is there a way to insert wp gallery shortcode into custom metabox textarea ? I would like to have something like this: New metabox in post/page with textarea and below textarea there are a button to ...
0
votes
3answers
403 views

Display Gallery Images from Custom Post Type

I want to display all the images added as gallery in a post with prettyphoto class. I am using this code. <?php /* The loop */ while ( have_posts() ) : the_post(); ...
1
vote
0answers
78 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 ...
0
votes
0answers
12 views

Manage Custom Gallery Shortcodes using Media Manager

I would like to create multiple gallery shortcodes (ie [gallery],[gallery-grid],[gallery-slider],[gallery-simple],etc.) I know how to create custom gallery shortcodes, but I was would like to use ...
0
votes
1answer
251 views

How to dynamically insert <a href> in the image caption?

So, below is the Wordpress default generated code for a gallery item: <div id='gallery-1' class='gallery galleryid-203 gallery-columns-3 gallery-size-thumbnail'> <dl ...
0
votes
0answers
19 views

Custom wordpress media upload tab with the attachment browser

I've managed to add a new tab to the "Add Media" window with the help of this answer. Now I'm trying to add a custom gallery type in this tab. I'm trying to add the default attachment browser in this ...
3
votes
2answers
2k views

Customizing gallery shortcode in 3.5

I'm trying to customize the gallery shortcode using the new gallery system in 3.5 and I'm having a bit of trouble and can't figure out where I'm going wrong. This is what I've got at the moment (in ...
0
votes
1answer
50 views

Gallery shortcode menu order fix no longer working on Wordpress 4.0

I currently use the pmc_gallery_menu_order_fix for setting the menu order for image attachments in galleries as seen here: Wordpress 3.5 Gallery Menu Order not set? With Wordpress 4.0, I am now ...
1
vote
2answers
323 views

Custom gallery in wp3.5

I used a tutorial I found for a slick little custom gallery in 3.4, but upon upgrade to 3.5 it no longer works. I'm trying to learn php still and can't seem to get this working again, as I either get ...
1
vote
2answers
1k views

Add an image gallery to a custom post type?

I am pulling data from an external web service into a custom post type. This data includes images. How can I create an image gallery, add some existing attachments to it, and associate it with a post? ...
1
vote
0answers
46 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 ...
0
votes
0answers
9 views

Getting attachments to a post to show in the order they are in the WYSIWYG editor

I am trying to get the images that are inserted into my gallery to show in the actual order that they are showing in the WYSIWYG editor. My code looks like this: <?php $args = array( ...
0
votes
1answer
25 views

Move captions under gallery images in twenty fourteen theme

The new twenty fourteen theme will only show captions on top of gallery thumbs. Is there something I can do in the functions (or copy from twenty ten) to make them visible all the time and show up ...
0
votes
0answers
38 views

Gallery random image sizes

I'm trying to get a masonry layout to work with the standard [gallery] shortcode. This is the code I have in my post-gallery (for the gallery post-format). echo '<div class="zephyr-gallery">'; ...
0
votes
0answers
25 views

Wordpress gallery shortcode - include author's images

I'm using the built-in wordpress gallery shortcode to display all images of a category -- documentation found here: Wordpress Gallery Shortcode Codex --- By using [gallery category="1"] How could ...
0
votes
0answers
22 views

How to display a custom built field on wordpress default gallery

I created a custom field for the media I can upload on my wordpress website, by adding this code to functions.php: /** * Adding a "Copyright" field to the media uploader $form_fields array */ ...
0
votes
1answer
61 views

CSS styling of native (inbuilt) wordpress thumbnails [closed]

I really hope someone will be able to help me with this as it should be really simple but I am struggling! I am working on the 'native' or inbuilt wordpress thumbnail gallery (not a plugin). I want ...
5
votes
3answers
2k views

Split Content and Gallery

Is there a way to split up the post content and the gallery short code. I want to display the gallery outside my normal content no matter how or where it is placed. I can use this to get the shortcode ...
3
votes
3answers
275 views

Images Missing from built in WP Gallery

My wife has a wordpress 3.9.2 site that has a ton of images spread across many galleries. Many of those galleries though, have hundreds of images. This is partly managed by the Paginated Effects ...
1
vote
0answers
83 views

Wordpress 4.0 Media Gallery (Same Image) Bug - Does anyone know how to fix this? [closed]

So, we've been working on this site for a long time and have finally started finishing up. As a last cleanup we updated all our plugins and Wordpress to 4.0 and expected awesomeness. However, for ...
3
votes
1answer
135 views

How to add a “data-” attribute to the image tag of native gallery output

While trying to make WordPress and Galleria to become friends I already have a good result. Galleria can easily be used to display native WordPress Galleries. I'm using a plugin but that's not ...
1
vote
3answers
426 views

Post photo galleries [closed]

Anyone know how to make a gallery post where you make one image the cover of the photo gallery and whenever it is clicked it links to the gallery? The use this method on thechive.com. I'm really not ...
0
votes
0answers
50 views

Navigate through the gallery using keyboard arrows

What I am trying to do is navigate through a post gallery using the left and right arrow key. I am aware the key codes for these are e.keyCode == 37 and e.keyCode == 39 What will be the best way to ...
0
votes
1answer
342 views

Create Short code dynamically

I want to generate short code for my gallery dynamically. For a single gallery, it is easy to create a short code for my gallery using add_shortcode( 'image-gallery', 'gallery' ) Now my question is ...
6
votes
2answers
229 views

Is it possible to query all posts that don't have an attachment?

I want to get a list of all posts that don't have an attachment and delete them. This question takes about getting all posts that have an attachment, but I want the reverse of it. The brute force ...
2
votes
4answers
7k views

How to get Page/Post Gallery attachment images in order they are set in backend using WP_Query()?

I am trying to retrieve all the images from the Gallery of a page in the order they are set in the backend. So far I have: $my_wp_query = new WP_Query(); $all_wp_pages = $my_wp_query->query( ...
0
votes
1answer
88 views

How do display gallery embedded to the custom post type

I have a custom post 'events'. For each post there is a gallery attached. On a main galley page i am displaying featured images from each post . Now i want that when person clicks on this featured ...
0
votes
3answers
577 views

Gallery post images on homepage?

I have a post with image gallery, it has 10 images. Can I get the direct link to the images in the post, so that I can display first 5 images on the homepage?
0
votes
1answer
28 views

How to Retrieve data of Gallery Shortcode and display it above a post

I'm trying to style my theme without resorting to custom fields. For gallery posts type, most premium themes are using custom field which is the method I used till now. With it, I could then retrieve ...
1
vote
1answer
24 views

How to force Wordpress to add new images at the beginning of the gallery?

I have the standard gallery embedded in the page and want to add new images to it. When I select images and click Add to gallery button Wordpress adds them at the end. How to force it to add images ...
2
votes
1answer
45 views

Set default link type to “file” for image galleries

Whenever you add a image gallery to a post, the images automatically link to the image attachment pages. This is not ideal, because I want to use Fancybox so the user can cycle through the images. I ...
0
votes
1answer
84 views

attachment.php & flexslider—linking thumbnail to specific image

I am nearly there but need the help of the community to bring me home! I am linking from a "gallery overview" page (thumbnail grid) to a single, full-size image page (attachment.php) containing a ...
0
votes
0answers
37 views

Custom Field, add gallery id

Is it possible to add a gallery id like [gallery ids="9"] to custom field using the media editor in wordpress? I have attached a media function to a specific custom field but are not able to insert ...
0
votes
1answer
89 views

Add anchor tag on previous_image_link / next_image_link

I am using big headers on my website.I need the next/previous_image_link to target to the picture , not the top of the page. Is it possible to add anchor or to set the target on ...
0
votes
0answers
73 views

Remove Captions from Custom Gallery function.php

I like to prevent captions from being outputted in my custom gallery function. I could easily just hide it using CSS but it doesn't feel right. The caption is being sent from media.php this line. ...
0
votes
1answer
301 views

Gallery backend only

I'm using Wordpress to power the blog section of my website, and also my event timeline (using custom post type admin area). I'm looking to add the option to create image galleries, and include them ...
0
votes
0answers
18 views

Change Wordpress Gallery Markup in functions.php

I'm looking to change the markup of the Wordpress Gallery, so that it outputs a new set of code. Ideally, this is what I want (a Bootstrap-based markup). <div class="col-md-3 col-sm-4"> ...
0
votes
0answers
11 views

Gallery preview on Post Format posts

I am trying to put a 2 picture preview of a gallery on each post that is the post format of 'gallery'. I managed to get all the thumbnails to show up in a post with: <?php echo ...
-1
votes
1answer
41 views

Click thumbnail, change main image - NextGen or somethign else?

I'm trying to get the main image to change depending on the thumbnail image clicked. I would want the main image to take its new src from the a tag of the thumbnail that was clicked. Good example is ...
1
vote
1answer
147 views

How to get clean code for a gallery?

I want clean code for a gallery, like: <div class="gallery"> <ul> <li><a href='../wp-content/uploads/2014/04/lgitem-01.jpg'><img width="150" height="150" ...
0
votes
0answers
38 views

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 ...
0
votes
0answers
35 views

Gallery image archive page

I need to create an image gallery archive page. Actually I need something like where user will be able to create an image gallery with a few images and with a title through admin panel. The gallery ...