LightBox Options?

jdobbsy1987
23 Posts
jdobbsy1987 posted this 28 February 2015

Is there a way to edit how the LightBox works?

Current when you open an image the only way to close it is clicking on the big X in the top right

2015-02-28-16-19-12-PriceSpy---MoneyMate4u.png

However i would rather it work like it does here http://fancybox.net/

2015-02-28-16-21-31-Fancybox---Fancy-jQuery-lightbox-alternative.png

Is there a way to change the behaviour, i don't want to use a 3rd party plugin if i can help it.

Cheers,
Jamie

Is there a way to edit how the LightBox works? Current when you open an image the only way to close it is clicking on the big X in the top right !2015-02-28-16-19-12-PriceSpy---MoneyMate4u.png! However i would rather it work like it does here http://fancybox.net/ !2015-02-28-16-21-31-Fancybox---Fancy-jQuery-lightbox-alternative.png! Is there a way to change the behaviour, i don't want to use a 3rd party plugin if i can help it. Cheers, Jamie
Vote to pay developers attention to this features or issue.
8 Comments
Order By: Standard | Newest
Support Team
Support Team posted this 02 March 2015

Hello,
no there's no way to style lightbox in Themler, only predefined style is applied.
However you may use WP Fancy lightbox plugin
https://wordpress.org/plugins/fancybox-for-wordpress/

To use it with Themler's theme no please follow the steps:
1. configure the Fancy lightbox plugin
2.open Post (or Page) in WP admin and add "no-lightbox" class to <img> tag, e.g.

<a href="http://localhost/wordpress4_1/wp-content/uploads/2015/01/grano-2.jpg"><img class="alignnone size-medium wp-image-50 no-lightbox" src="http://localhost/wordpress4_1/wp-content/uploads/2015/01/grano-2-300x300.jpg" alt="grano-2" width="300" height="300" /></a>

Important: class="alignnone size-medium wp-image-50 no-lightbox"

3.now the Fancy lightbox style is used.

Regards,
Aileen

Hello, no there's no way to style lightbox in Themler, only predefined style is applied. However you may use WP Fancy lightbox plugin https://wordpress.org/plugins/fancybox-for-wordpress/ To use it with Themler's theme no please follow the steps: 1. configure the Fancy lightbox plugin 2.open Post (or Page) in WP admin and add "no-lightbox" class to `&lt;img&gt;` tag, e.g. <a href="http://localhost/wordpress4_1/wp-content/uploads/2015/01/grano-2.jpg"><img class="alignnone size-medium wp-image-50 no-lightbox" src="http://localhost/wordpress4_1/wp-content/uploads/2015/01/grano-2-300x300.jpg" alt="grano-2" width="300" height="300" /></a> *Important:* class="alignnone size-medium wp-image-50 **no-lightbox**" 3.now the Fancy lightbox style is used. Regards, Aileen
Stagger Lee
1840 Posts
Stagger Lee posted this 04 March 2015

For WP galleries:

function add_class_attachment_link($html){
    $postid = get_the_ID();
    $html = str_replace('<a','<a class="no-lightbox"',$html);
    return $html;
}
add_filter('wp_get_attachment_link','add_class_attachment_link',10,1);

For WP galleries: function add_class_attachment_link($html){ $postid = get_the_ID(); $html = str_replace('<a','<a class="no-lightbox"',$html); return $html; } add_filter('wp_get_attachment_link','add_class_attachment_link',10,1);
Stagger Lee
1840 Posts
Stagger Lee posted this 02 April 2015

How to disable default Themler Lightbox ?

How to disable default Themler Lightbox ?
Stagger Lee
1840 Posts
Stagger Lee posted this 02 April 2015

I see now. It was Post/Page Content. I was clicking on image.

I see now. It was Post/Page Content. I was clicking on image.
oceanite
49 Posts
oceanite posted this 29 September 2016

For WP galleries:

function add_class_attachment_link($html){
    $postid = get_the_ID();
    $html = str_replace('&lt;&gt;&lt;a class &#39;,$html);&gt;         return $html;

> }
> add_filter('wp_get_attachment_link','add_class_attachment_link',10,1);

Hello,
where I put that code for disable lightbos themler ?
Thanks

> For WP galleries: > > function add_class_attachment_link($html){ > $postid = get_the_ID(); > $html = str_replace('&lt;&gt;&lt;a class &#39;,$html);&gt; return $html; &gt; } &gt; add_filter(&#39;wp_get_attachment_link&#39;,&#39;add_class_attachment_link&#39;,10,1); Hello, where I put that code for disable lightbos themler ? Thanks
Stagger Lee
1840 Posts
Stagger Lee posted this 29 September 2016

It is in options, no need for code. Read Documentation, info is there with images.

It is in options, no need for code. Read Documentation, info is there with images.
oceanite
49 Posts
oceanite posted this 29 September 2016

It is in options, no need for code. Read Documentation, info is there with images.

this link ?:

http://answers.themler.com/articles/5910/disable-lightbox-for-particular-images

> It is in options, no need for code. Read Documentation, info is there with images. this link ?: http://answers.themler.com/articles/5910/disable-lightbox-for-particular-images
Stagger Lee
1840 Posts
Stagger Lee posted this 29 September 2016

Yes, it is.

Yes, it is.
You must log in or register to leave comments