Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Antonio La Rocca

    (@therock130)

    Hi there

    Maybe you can find some inspiration on how to do this on this article ??

    Hello, the issue was resolved by filter and shortcode

    Here’s the shortcode
    [yith_wcwl_items_count]

    // YITH add item number
    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() {
    			
    			echo '<a href="https://www.sarka.sk/oblubene/"><div class="yith-wcwl-counter">';
    			echo '<i class="yith-wcwl-icon fa fa-heart"></i>';
    				echo '<span class="count">'. esc_html( yith_wcwl_count_all_products() ) .'</span>';
    			echo '</div></a>';
    			
    		}
    	}
    	add_action( 'init', 'yith_wcwl_add_counter_shortcode' );
    }

    this filter and custom shortcode. Works fine.
    Here’s the CSS I have used

    
    .yith-wcwl-counter {
    	color: #656565;
    	position: relative;
    }
    
    .yith-wcwl-counter:hover {
    	color: #f5c3c4;
    }
    
    .yith-wcwl-counter .count {
    	position: absolute;
    	top: -0.9em;
    	right: -0.7em;
    	font-size: 10px;
    	padding: 0;
    	margin: 0;
    	border-radius: 50%;
    	background: #dd6561;
    	color: #fff;
    	width: 1.6em;
        height: 1.6em;
        text-align: center;
        line-height: 1.5;
    }
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Number of items in wishlist’ is closed to new replies.