• Resolved Roger

    (@erpol53)


    Hi,

    The title says it all.

    – I’m using a professional theme (from Cssigniter).
    – I disabled the theme’s lightbox
    – SLB is working fine and groups all images in the post, but doesn’t work on the featured image
    – I tried D-factory’s responsive LB, and if I put the same rel selector in its settings, and in the featured image’s url in single.php, then the featured image shows fine.

    I would very much like to use SLB, without completely changing the single.php code, and if possible group all post images including the featured. Don’t you have a reserved rel selector that I could use ?

    Thanks for any help,

    RP

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Archetyped

    (@archetyped)

    Hi, please refer to SLB’s Documentation for details on activating links, including an example specifically for activating post thumbnails.

    Thanks.

    Thread Starter Roger

    (@erpol53)

    Hi, yes it works perfectly thank you although a bit less coding would have been welcome!
    ??

    Any chance you’ll release a finger-swipeable version for mobile platforms in the future ? Should I add this in the github improvement suggestions ?

    Thanks anyway for a great plugin!

    RP

    Plugin Author Archetyped

    (@archetyped)

    Yes, enhancements for mobile devices are on the to-do list.

    Thanks.

    Hi
    I’ve asked before (about a year ago) but not experienced enough to follow the directions
    I just don’t get it
    Anyway continued trying to figure this thing out
    I am using a child theme called MH NewsMagazine to the theme MH Magazine lite
    In the child theme I did put a copy of the content-single.php
    So far no problems but when I added the code to the line <?php mh_magazine_lite_featured_image(); ?> I got 2 images on the page
    One where the featured images is and below the full sized image – clickable but way to big
    I wanted the lightbox to work on the featured image
    This is how I wrote it

    <?php mh_magazine_lite_featured_image(); 
    
    		// Link post thumbnail to full-size image.
    if ( has_post_thumbnail() ) {
    	$thumbnail = [
    		// URI of full-size post thumbnail image.
    		'uri' => get_the_post_thumbnail_url( null, 'full' ),
    		// HTML to display post thumbnail.
    		'img' => get_the_post_thumbnail(),
    	];
    	// Build thumbnail link.
    	$thumbnail['link'] = sprintf( '<a href="%s">%s</a>', esc_attr( $thumbnail['uri'] ), $thumbnail['img'] );
    
    	// Display full-size image in lightbox when clicked.
    	if ( function_exists( 'slb_activate' ) ) {
    		$thumbnail['link'] = slb_activate( $thumbnail['link'] );
    	}
    
    	// Display post thumbnail.
    	echo $thumbnail['link'];
    }
    	?>

    Where did I go wrong?

    Plugin Author Archetyped

    (@archetyped)

    @mikeyswede per the forum’s guidelines, please create a separate post for your issue so that it can be fully evaluated and isolated from any other users’ inquiries. Please also provide a link to a page that exhibits the issue you are experiencing in the new post, and I would be glad to take a look.

    Thanks.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Can’t get SLB to work on featured image’ is closed to new replies.