• Resolved dardar26

    (@dardar26)


    Hi I saw someone posted this question last year so I tried the solution you gave him but the problem is the thumbnails and the caption still opens a lightbox even if we change the class name of the gallery.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author keesiemeijer

    (@keesiemeijer)

    Hi dardar26

    How did you change the class?

    Thread Starter dardar26

    (@dardar26)

    via functions.php

    
    add_filter( 'related_posts_by_taxonomy_gallery_item_class', 'rpbt_gallery_item_class' );
    
    function rpbt_gallery_item_class($class) {
        return 'rpbt-item';
    }
    
    • This reply was modified 4 years, 7 months ago by keesiemeijer. Reason: fix code formatting
    Plugin Author keesiemeijer

    (@keesiemeijer)

    That should change the class for gallery items. It however didn’t change it in your page. In what file are you using this?

    To change the class for the whole gallery try this in your theme’s functions.php file.

    
    add_filter( 'related_posts_by_taxonomy_gallery', 'rpbt_remove_gallery_class' );
    
    function rpbt_remove_gallery_class($args) {
    	$args['gallery_class'] = '';
    	
    	return $args;
    }
    

    btw:
    consider creating a child theme instead of editing your theme directly – if you upgrade the theme all your modifications will be lost. Or create a plugin with the code above.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How can I make thumbnails link to the post instead of opening a lightbox?’ is closed to new replies.