Viewing 2 posts - 1 through 2 (of 2 total)
  • Posted in: Uplift
  • #309617
    micheal_w
    Member
    Post count: 498

    Hi Guys,

    Is it possible to rename the SALE badge to something else?
    Also, is it possible to make the writing bigger?

    Thanks!

    #309626
    David Martin – Support
    Moderator
    Post count: 20834

    Yes, you would simply override the function in your child theme functions.php file:

        /* PRODUCT BADGE
        ================================================== */
        if ( ! function_exists( 'sf_woo_product_badge' ) ) {
    	    function sf_woo_product_badge() {
    	    	global $product, $post;
    	    	$sf_options 	= sf_get_theme_opts();
    	    	$postdate 		= get_the_time( 'Y-m-d' );			// Post date
    	    	$postdatestamp 	= strtotime( $postdate );			// Timestamped post date
    	    	$newness 		= $sf_options['new_badge']; 	// Newness in days
    	    ?>
    		    <div class="badge-wrap">
    			    <?php
    
    			    	if (sf_is_out_of_stock()) {
    
    			    		echo '<span class="out-of-stock-badge">' . __( 'Sold out', 'uplift' ) . '</span>';
    
    			    	} else if ($product->is_on_sale()) {
    
    			    		echo apply_filters('woocommerce_sale_flash', '<span class="onsale">'.__( 'Sale', 'uplift' ).'</span>', $post, $product);
    
    			    	} else if ( ( time() - ( 60 * 60 * 24 * $newness ) ) < $postdatestamp ) {
    
    			    		// If the product was published within the newness time frame display the new badge
    			    		echo '<span class="wc-new-badge">' . __( 'New', 'uplift' ) . '</span>';
    
    			    	} else if ( $product->get_price() != "" && $product->get_price() == 0 ) {
    			    		echo '<span class="free-badge">' . __( 'Free', 'uplift' ) . '</span>';
    
    			    	}
    			    ?>
    		    </div>
    	    <?php }
    	}

    You can change the text size using CSS: http://www.w3schools.com/css/css_font.asp.

    So using the above instructions:

    .badge-wrap {
      font-size: 18px!important;
    }
Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.