Load another lightbox in place of rtmedia's lightbox

rtmeda is a well developed plugin. The reason I dont use it more is that not sure how to use another lightbox and image grid so to preserve the look and feel of our site.

Have a site that uses foobox sitewide and want the method to only load foobox, or for that matter have the ability to pick a lightboox would be an extraordinary option.

Loading another lightbox breaks the consistent look of the site in this case.

Which leads to another question, we would like the ability for justified image grid for galleries - I could make another post for that.

Hi @yoyoadmin

There are multiple ways to remove rtMedia lightbox. First is to disable it via admin settings and it won’t load single media in lightbox sitewide.

To disable lightbox for certain galleries, just add no-popup CSS class to media gallery item.

Check below code:

function rtmedia_gallery_list_item_add_no_popup_class( $class ){
	$class .= ' no-popup';

	return $class;
add_filter( 'rtmedia_gallery_list_item_a_class', 'rtmedia_gallery_list_item_add_no_popup_class' );

rtMedia uses magnific popup to show media in lightbox and stores the magnific popup reference in rtMagnificPopup variable. You alter the behavior using that reference.

The only thing remain is to bind your own lightbox which I’m sure will be very easy if you have doc guide available. Let me know if you need help in that.


Yes. I would love to bind my own lightbox. where can I find the doc guide to do this? I have no idea where to start. Thanks!