1
vote
2answers
29 views

(solved) how to have the gallery shortcode output one single UL list instead of several DL?

I need the built-in gallery shortcode to output UL instead of DL. How can I do it? I know I can use the 'post_gallery' filter, but that means almost duplicating the media's gallery_shortcode function. ...
1
vote
2answers
55 views

Change Wordpress Shortcode added in to post

Problem: I am using a plugin that turns the wordpress gallery into a cool slide show. How ever, every time I make a gallery - Wordpress add this code to the post . [gallery ids="334,332"] I need ...
0
votes
1answer
30 views

How to copy [gallery] shortcode between posts using polylang [closed]

We're using the excellent polylang to translate our website content and themes , there are a range of options about which fields and settings are duplicated between paired pages. We've selected to ...
1
vote
1answer
48 views

Remove hyperlink on gallery shortcode

I use a gallery shortcode in my index.php (theme directory) to display 3 boxes of images. The images are fetched from my Media. <div class="well well-clear" style="padding-bottom: 0; ...
1
vote
2answers
331 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 ...
0
votes
0answers
43 views

How can I determine if functionality is provided by a plugin or a custom shortcode on another wordpress site?

Recently, I purchased a theme from AIT-Themes.com, a company dedicated to Wordpress theme development. I purchased the Directory theme, and here is a page from that theme I'd like to be considered: ...
1
vote
1answer
65 views

Display gallery on bottom after content

How to execute the gallery shortcode after any other content no matter where the shortcode is in the post HTML? Thanks.
0
votes
1answer
99 views

How do i display the built-in gallery inside a widget?

I want to display a specific gallery (without a plugin = WordPress built-in gallery) inside a widget. I tried the shortcode [gallery ids="717"] but that doesn't work. Maybe a workaround could be ...
0
votes
0answers
95 views

Dynamically load JJ NextGen Slider/ Slideshow (dynamically add shortcode with jquery)?

My front page includes an image slideshow by JJ NextGen Slider (Link). Therefore I am using PHP and do_shortcode(). This is the full code: <?php echo do_shortcode('[jj-ngg-jquery-slider ...
0
votes
1answer
119 views

Changing layout of defaul gallery output to masonry

I'm changing the default layout for gallery shortcode. I have this in my functions.php: $attr['columns'] = 1; $attr['size'] = 'full'; $attr['link'] = 'none'; $attr['orderby'] = 'post__in'; ...
0
votes
0answers
55 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 ...
0
votes
0answers
62 views

Custom field for default gallery

How I can add custom field in default WordPress gallery? in visual editor and in shortcode.
0
votes
1answer
168 views

What makes a placeholder resizable in Tinymce?

It's not that hard to make a plugin to TinyMCE, similar to what the Wordpress gallery is doing in WP 3.5. Unfortunately, these custom placeholders are always non-resizable, although they show the ...
0
votes
1answer
173 views

Display meta data from a custom field within plugin Category Grid View Gallery

I am using this plugin, which creates a gallery of posts, fetching a thumbnail and the titles of the posts displayed in it. I have enabled Custom Fields, and have created (and filled in values) a ...
0
votes
1answer
182 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 ...
2
votes
2answers
902 views

Automatically add this attribute to the gallery shortcode

When inserting a gallery it adds the following shortcode: [gallery columns="6" ids="18,150,146,23,147,17,21,20,22"] I would like it to automatically add link="file" as the last attribute, whenever ...
1
vote
1answer
56 views

Showing a different gallery in a seperate post

i am using the [multigallery] function and I was wondering if there is a way to use the function to call attachments from another post. For example if i was writing a post about taylor swift and I ...
0
votes
1answer
130 views

Adding Image Count to Multigallery

Ok so I am using the [multigallery] function and it works fine, but one thing I want to add. Here is the code that I am using for the multigallery in my functions.php file function ...
0
votes
1answer
45 views

Which file renders the “Edit Gallery” Settings page?

I was looking for a tutorial on adding options to the "Edit Gallery" page. In the hopes of adding some GUI inputs that would result in the generated [gallery] short-code having custom attributes. I ...
0
votes
1answer
133 views

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 ...
0
votes
1answer
123 views

Gallery shortcode numerical sorting

When I try to sort a Gallery created through the [gallery] shortcode by numerical titles I get them sorted in alphabetical order. That means that they are sorted like so: 1, 3, 34, 4, 56, 6, etc. ...
4
votes
1answer
829 views

How to paginate wordpress [gallery] shortcode?

I am using wordpress gallery shortcode [gallery] I was wondering if there is anyway to paginate them without using a plugin.
1
vote
2answers
616 views

Wordpress Gallery shortcode: Display one category ID only

Good Day. I am using a Gallery shortcode in my wordpress site to display images. Problem is that I wasnt the gallery to show only images from a certain category, for example category id 35. How do I ...
0
votes
1answer
1k views

How to display NextGEN gallery in templates?

I have installed the NextGEN Gallery plugin and have all my images in albums. Can someone please support me in displaying the NextGEN gallery with the use of the Galleryview plugin? Is there any ...
-1
votes
1answer
496 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 ...
1
vote
2answers
2k views

How to get gallery id inserted to a post?

Is it possible to get a specific Gallery ID inserted to a post in wordpress 3.5? I want to load gallery from post using Ajax. I use shortcode [gallery] to do it. But when I use it this way: echo ...
0
votes
1answer
223 views

Use full size images in a specific gallery

Thumbnails are displaying as 100px however the full size is 130px which is what I want. I want this only in one specific gallery. Also would like to link each gallery thumbnail image to an external ...
2
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 ...
1
vote
1answer
74 views

Should I cache default WordPress gallery shortcode output?

I'm overriding default WordPress gallery like so: add_filter( 'post_gallery', 'my_gallery_shortcode'), 12, 2 ); function my_gallery_shortcode($output, $attr) { // some modifications ...
0
votes
2answers
630 views

change wordpress gallery shortcode to slider

Hi I wanted to change the default WordPress gallery short-code and make it a slider. remove_shortcode( 'gallery' ); function gallery_filter( $atts, $content = null ) { ...
4
votes
2answers
2k 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 ...
2
votes
1answer
163 views

Numbering Image List in Gallery

While adding images in a post with the gallery shortcode, I want to display an image number as title of the image e.g if there are 3 images in a gallery and displayed as a list, above each image there ...
1
vote
1answer
181 views

Check if post has gallery images/media

Is there a Wordpress conditional that I can use to check for gallery images/media in a post? I do not want to check if the [gallery] shortcode exist in a post. Attached is a screenshot of what I ...
2
votes
3answers
372 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 ...
1
vote
1answer
227 views

Adding option to Gallery shortcode

just starting out in WP dev, and I'm looking for any guidance I can get. What I'd like to do is use a hook or filter to add my own option to the core WP gallery shortcode. I would want it to work just ...
0
votes
1answer
155 views

Don't show images inserted into content

I'm using a lightbox plugin to display my post images with [gallery], it works but those images show up in the content area too. So there are thumbnails and full size of same image. How can i hide ...
0
votes
1answer
729 views

conditional shortcode not working

I'm using a plugin, NextGEN gallery, to display photos. Each gallery from this plugin corresponds to a different sub-page, so I'm using conditional shortcodes to assign the right gallery to it's ...
2
votes
3answers
883 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 ...
0
votes
1answer
126 views

how to show last 5 images from the one post gallery

i want to get the 5 images of a one post gallery and show this random, example : [gallery id="123" orderby="rand" {numberpost=1 } or offset ? ] [gallery] codex tanks for help me.
1
vote
1answer
119 views

conditional tags- how to use with shortcodes

I have a salon website with a gallery page wherein the user must first select a stylist prior to viewing their individual gallery. I planned on using NextGen to house the images in stylist specific ...
1
vote
0answers
64 views

NextGEN Gallery- using shortcode for different galleries on different pages [duplicate]

Possible Duplicate: conditional shortcode not working I have a salon website with a gallery page wherein the user must first select a stylist prior to viewing their individual gallery. I ...
1
vote
1answer
741 views

Gallery shortcode - change link file image size? (not using default fullsize image)

I am using this for my gallery - <?php echo do_shortcode('[gallery size="gallery-thumb" link="file"]'); ?> and I am using the jquery fancyapps fancybox. But some full-size images that are in ...
0
votes
1answer
382 views

gallery shortcode exclude not working

I'm using this bit of code on single.php: $params='[gallery link="file" size="my_thumbnail_small" exclude="'.$featuredId.'"]'; $gallery = do_shortcode($params); echo $gallery; But nomatter what I ...
3
votes
1answer
291 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?
-2
votes
2answers
2k views

How can I make all gallery images to open in a new window?

How can I make all gallery images to open the high resolution image in a new window?
0
votes
1answer
266 views

Gallery Shortcode Function Help

Okay, so I found this code online that allows you to add the option of how many thumbnails you want to show in the gallery shortcode. The code below is what they say to add to the functions.php file ...
9
votes
3answers
13k 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): ...
1
vote
2answers
1k views

Remove width and height attributes from [gallery] output

WordPress automatically adds the width and height attributes to [gallery] shortcode images. How to delete these attributes? Something like this but for [gallery] output.
1
vote
2answers
577 views

Display gallery on top before content

Is it possible to execute the gallery shortcode before any other content no matter where the shortcode is in the post HTML?
0
votes
1answer
1k views

Gallery Shortcode: using size=“full” doesn't call the actual thumbnail image size

I have my Media settings set up so that my thumbnail size is 60x60 pixels and the "Crop thumbnail" box is checked. I can see in the /uploads folder that there are in fact perfect square 60x60 ...