Description of the problem – pictures pop up using all kinds of carousels from Total theme, but when customizing the output of a pop-up thumbnail for a blog (see example below), these pictures did not pop up with class=”wpex-lightbox”.
The problem is that Total theme scripts are not displayed on all pages, but only where necessary. If you need the theme functionality to work everywhere, you need to add lightbox loading everywhere in functions.php:
add_filter( 'wpex_load_ilightbox_globally', '__return_true' );
Here is a ready-made solution for a pop-up blog thumbnail:
if ( 'thumbnail' == $media_type ) { $thumb_id = get_post_thumbnail_id(); $thumb_url = wp_get_attachment_image_src($thumb_id,'thumbnail-size', true); echo '<a href="'; echo $thumb_url[0]; echo '" class="wpex-lightbox">'; the_post_thumbnail(); echo '</a>'; //get_template_part( 'partials/blog/media/blog-single' ); // fallback support for pre v5 }