Home Forums WoodMart support forum Change share social button style from default to colored-alt

Change share social button style from default to colored-alt

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #51482

    Jarda
    Participant

    I want change share social button style from default to colored-alt in the single product. I don’t know how. I found this post, but I did not find similar code in the woodmart/woocommerce/content-single-product.php.

    Thanks

    Attachments:
    You must be logged in to view attached files.
    #51495

    Artem Temos
    Keymaster

    Hi,

    Try to add the following PHP code snippet to the child theme functions.php file to do this

    	function woodmart_product_share_buttons() {
    		$type = woodmart_get_opt( 'product_share_type' );
    		?>
    			<?php if ( woodmart_is_social_link_enable( $type ) ): ?>
    				<div class="product-share">
    					<span class="share-title"><?php echo ($type == 'share') ? esc_html__('Share', 'woodmart') :  esc_html__('Follow', 'woodmart'); ?></span>
    					<?php echo woodmart_shortcode_social( array( 'type' => $type, 'size' => 'small', 'style' => 'colored-alt' ) ); ?>
    				</div>
    			<?php endif ?>
    		<?php
    	}

Tagged: , ,

Viewing 2 posts - 1 through 2 (of 2 total)