Skip to content
We are currently moving the site to Pressable Some downtime may occur during this transition — thanks for your patience while we get things running smoothly!

Snippet: Override Carousel Icons with Custom SVG’s

The following snippet can be used to override the theme's default carousel arrows with other theme icons or to completely change them to use your own SVG's.

/**
 * Use different theme icon (recommended method).
 *
 * Icons List: https://totalwptheme.com/docs/icons/
 */
add_filter( 'totalthemecore/vcex/carousel/owl/prev_icon_name', 'arrow-left' );
add_filter( 'totalthemecore/vcex/carousel/owl/next_icon_name', 'arrow-right' );

/**
 * Use completely custom icons.
 */
add_filter( 'totalthemecore/vcex/carousel/owl/default_options', function( $options ) {
	// Simply change the SVG's to your custom SVG's
	$options['prevIcon'] = '<span class="wpex-carousel__arrow-icon wpex-flex wpex-svg-icon wpex-icon--bidi"><svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"/></svg></span>';
	$options['nextIcon'] = '<span class="wpex-carousel__arrow-icon wpex-flex wpex-svg-icon wpex-icon--bidi"><svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8-8-8z"/></svg></span>';
	return $options;
} );
All PHP snippets should be added via child theme's functions.php file or via a plugin.
We recommend Code Snippets (100% Free) or WPCode (sponsored)
Back To Top