Skip to content

Instantly share code, notes, and snippets.

@wpt00ls
Last active April 8, 2023 07:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wpt00ls/7879d59dfb726b2f274d32418c897789 to your computer and use it in GitHub Desktop.
Save wpt00ls/7879d59dfb726b2f274d32418c897789 to your computer and use it in GitHub Desktop.
[ Ultimate Carousel For Divi ] Change navigation button html using wordpress filter
<?php
// Filter to change the ultimate carousel navigation button HTML.
// Add it to your functions.php file of your child theme
add_filter(
'uc_carousel_nav_button_html',
function (
$html,
$nav_type
) {
if ($nav_type == 'prev') {
return '<div class="swiper-button-prev swiper-nav">D</div>';
}
if ($nav_type == 'next') {
return '<div class="swiper-button-next swiper-nav">E</div>';
}
},
10,
2
);
/* Add the styles to your child theme OR on the Divi Page */
.swiper-nav.swiper-button-next,
.swiper-nav.swiper-button-prev {
font-family: ETmodules !important;
}
.swiper-button-next:after,
.swiper-button-prev:after {
content: none !important;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment