Title: Remove data-carousel-extra
Last modified: October 20, 2016

---

# Remove data-carousel-extra

 *  Resolved [Nullmind](https://wordpress.org/support/users/dnkit/)
 * (@dnkit)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/remove-data-carousel-extra/)
 * 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.
 * ![](https://i0.wp.com/dl.dropboxusercontent.com/u/16938460/Schermata%202016-10-
   20%20alle%2017.59.51.jpg?ssl=1)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [keesiemeijer](https://wordpress.org/support/users/keesiemeijer/)
 * (@keesiemeijer)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/remove-data-carousel-extra/#post-8343969)
 * 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 9 years, 7 months ago by [keesiemeijer](https://wordpress.org/support/users/keesiemeijer/).
    -  This reply was modified 9 years, 7 months ago by [keesiemeijer](https://wordpress.org/support/users/keesiemeijer/).
 *  Thread Starter [Nullmind](https://wordpress.org/support/users/dnkit/)
 * (@dnkit)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/remove-data-carousel-extra/#post-8344273)
 * 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.

 * ![](https://ps.w.org/related-posts-by-taxonomy/assets/icon.svg?rev=1115231)
 * [Related Posts by Taxonomy](https://wordpress.org/plugins/related-posts-by-taxonomy/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/related-posts-by-taxonomy/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/related-posts-by-taxonomy/)
 * [Active Topics](https://wordpress.org/support/plugin/related-posts-by-taxonomy/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/related-posts-by-taxonomy/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/related-posts-by-taxonomy/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Nullmind](https://wordpress.org/support/users/dnkit/)
 * Last activity: [9 years, 7 months ago](https://wordpress.org/support/topic/remove-data-carousel-extra/#post-8344273)
 * Status: resolved