• Resolved Nullmind

    (@dnkit)


    Hello,

    how can I remove the data-carousel-extra”….” from <div tag? I need to remove it because when I click on the image it opens a carousel image instead to go to post link.

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

    (@keesiemeijer)

    Hi Nullmind

    Sorry for the late reply. To have the carousel not target the (related post) gallery images you’ll need to change the gallery selector. Try it with this in your (child) theme’s functions.php file

    
    add_filter( 'gallery_style',  'widget_remove_gallery_class' );
    
    function widget_remove_gallery_class( $style ) {
    	if ( false !== strpos( $style, 'related-gallery' ) ) {
    		$style = str_replace( "class='gallery ", "class='", $style );
    	}
    	return $style;
    }

    This strips the gallery CSS selector from the div. Hopefully this is the selector used by your theme or carousel plugin. After this you’ll need to look in your (child) theme’s CSS file for any of the gallery selectors like .gallery. Copy them and replace it with .related-gallery

    • This reply was modified 8 years, 4 months ago by keesiemeijer.
    • This reply was modified 8 years, 4 months ago by keesiemeijer.
    Thread Starter Nullmind

    (@dnkit)

    Thank you,

    you are fantastic ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Remove data-carousel-extra’ is closed to new replies.