0
votes
1answer
95 views

Add gallery id to rel attribe of wp_get_attachment_link

Now i have this snippet in my functions.php /** * Add rel to links. */ function add_rel_to_gallery($link) { return str_replace('<a href=', '<a data-fancybox="true" rel="group" href=', ...
0
votes
0answers
32 views

Custom gallery image links

Is there a way to add individual links to each of the images within a gallery, for example, not to the media file or attachment page but to a custom URL?
0
votes
2answers
33 views

Detecting if parent page has gallery

My function to detect is a gallery is on a page has broken and Im not sure why. So in my theme template's attachment page Im calling this function: global $post; $parent_id = $post->post_parent; ...
0
votes
1answer
147 views

Help with WP gallery function, wrap gallery in div

I have a function in my functions.php file I need to change slightly and am having trouble doing it correctly. This function changes the gallery markup for Wordpress, making it more html5 friendly. It ...
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.
1
vote
0answers
75 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 ...
0
votes
1answer
24 views

Functions Error: Impacting Galleries

The function below controls an option inside an options panel. What it does is choose the number of posts being displayed in a particular archive (to_count archives, to_count_home, to_count search ...
1
vote
1answer
144 views

watermarking gallery items

How can I add an image watermark to only those images which are to be published in gallery using a function in functions.php? Images can be in .jpg, .png, .gif format. I also found this snippet ...
1
vote
2answers
300 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
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
2answers
94 views

Check if a different page has any attached images

I am trying to make a notification function for a user's account dashboard that displays if they have not added any images to their profile's gallery. I found this page, which is a function that ...
0
votes
2answers
201 views

Wordpress as CMS: How to manage/handle images assigned to a post as full-sized background images in a slideshow?

I wonder if Wordpress is the best CMS or solution for what I wannt to do? I need to find some way to upload images to a post that I can loop as background images. Just like I can upload multiple ...
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): ...
0
votes
1answer
396 views

Auto create Nextgen Gallery on post creation

I was wondering if there is a way to create a nextgen gallery with a function, so that I can hook that into my front end post creation setup. The gallery could be completely empty or be created with ...
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?
1
vote
1answer
2k views

Default Gallery Edit/Template Editable?

I quite like the default WordPress Gallery, but i dont like how it plonks the images as thumbnails, with a link to the larger image. Is there anyway to make it display the images not in a thumbnail ...