Home › Forums › Legacy Support › Support queries › Other issues › Please Introduce support for WP Gallery Custom Links
Tagged: custom, filter, gallery, post_gallery, Shortcode
- This topic has 4 replies, 3 voices, and was last updated 8 years, 3 months ago by H.K. Latiyan.
Viewing 5 posts - 1 through 5 (of 5 total)
-
AuthorPosts
-
July 13, 2016 at 10:57 pm #58263eclipsedevSpectatorHello, I was trying to implement WP Gallery Custom Links (http://wordpress.org/plugins/wp-gallery-custom-links/) and found it wasn't doing anything to the galleries on my site. I was able to determine the cause as the gallery shortcode is replaced with a custom one found in vibe-shortcodes plugin. This custom version omits the post_gallery filter call required for the plugin to operate on the gallery. Following this note on the plugin page; Thing to try #3: make sure the hook that this plugin uses (the "post_gallery" filter) is being called. Some themes and gallery plugins have code that replaces the default WordPress gallery code, and the post_gallery filter gets left out, which means this plugin never gets called to do anything. If you do a "View Source" on your gallery page and see a javascript file named "wp-gallery-custom-links.js" being included, but items you know have custom links are not using the custom links, try looking around in your theme/gallery plugin to see if the gallery shortcode is being replaced, and if that function doesn't contain a reference to post_gallery, try adding this near the top of the function (assumes the attributes variable passed to the shortcode function is named "$attr"): $output = apply_filters('post_gallery', '', $attr); if ( $output != '' ) return $output; You may want to see http://wordpress.org/support/topic/wont-work-syntax-error for an example of adding this code. This thing to try is a bit on the programmy side, so if you're having trouble, my suggestion would be to contact your theme author and ask that they support the "post_gallery" filter in their gallery shortcode function. This would not only fix it for your theme most thoroughly, but would also fix it for any future users also using that same theme. Otherwise, any WordPress developer should be able to help you with the code changes to customize your theme to support the post_gallery filter like WordPress core (not something I consider in the realm of free support, sorry). I was able to get it operational by introducing the following code at the beginning of the custom gallery function; $output = apply_filters('post_gallery', '', $attr); if ( $output != '' ) return $output; Please introduce this to your gallery shortcode in the next vibe-shortcode plugin update so as to support the WP Gallery Custom Links plugin. Thank youJuly 14, 2016 at 1:23 pm #58388Anshuman SahuKeymasterSure we will be adding this in the update of vibe shortcodes plugin update . thanks for reporting this to us .July 14, 2016 at 5:32 pm #58455eclipsedevSpectatorThanks Alex, Greatly appreciated.July 15, 2016 at 6:31 am #58519H.K. LatiyanParticipantTrello: https://trello.com/c/VCVByzIRAugust 17, 2016 at 7:48 am #64946H.K. LatiyanParticipantThis issue has been resolved in the latest update of wplms 2.2 So please update all your plugins and the wplms theme to the latest versions i.e. 2.2 and then check.
-
AuthorPosts
Viewing 5 posts - 1 through 5 (of 5 total)
- The topic ‘Please Introduce support for WP Gallery Custom Links’ is closed to new replies.