[Plugin: WP jQuery Lightbox] rel="lightbox" not working with do_shortcode function
-
Hi!
I’ve been using this plugin in some projects and it’s amazing, thank you for your work!
I have a little problem with a current project. Like always, when I use the plugin with the gallery shortocde like
[gallery link="file"]
it works fine inside the content.But now, I’ve found a problem using the gallery shortcode ousite the content. I’m running the gallery this way with the do_shortcode function:
echo do_shortcode('[gallery link="file"]');
Looking at the plugin code, I see that the filters which add the
rel="lightbox"
attribute are:add_filter('the_content', 'jqlb_autoexpand_rel_wlightbox', 99); add_filter('the_excerpt', 'jqlb_autoexpand_rel_wlightbox', 99);
This filters are only running on the_content and the_excerpt, so I’m trying to add a filter to the do_shortcode function this way but it’s not working fine:
add_filter('do_shortcode', 'jqlb_autoexpand_rel_wlightbox', 99);
Do you know how can I make the do_shortcode function work?
Thanks!!
- The topic ‘[Plugin: WP jQuery Lightbox] rel="lightbox" not working with do_shortcode function’ is closed to new replies.