Hi there
The following code will define the shortcode yith_wcwl_items_count
, that will just contain an heart icon (if your theme doesn’t forcefully remove FontAwesome) and count of items in wishlist
if ( function_exists( 'YITH_WCWL' ) ) {
if ( ! function_exists( 'yith_wcwl_add_counter_shortcode' ) ) {
function yith_wcwl_add_counter_shortcode() {
add_shortcode( 'yith_wcwl_items_count', 'yith_wcwl_print_counter_shortcode' );
}
}
if ( ! function_exists( 'yith_wcwl_print_counter_shortcode' ) ) {
function yith_wcwl_print_counter_shortcode() {
?>
<div class="yith-wcwl-counter">
<i class="yith-wcwl-icon fa fa-heart"></i>
<span class="count"><?php echo esc_html( yith_wcwl_count_all_products() ); ?></span>
</div>
<?php
}
}
add_action( 'init', 'yith_wcwl_add_counter_shortcode' );
}
You can use it wherever you can add and render shortcode, and apply style or change HTML structure in the code that I provided, to customize its appearance