This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$type = $product->product_type; | |
$sku = $type == 'simple' ? $product->get_sku() : ''; | |
echo $sku; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0% | |
0% risk | |
777 | |
99% | |
99.9% | |
100% | |
100% more | |
#1 | |
$$$ | |
100% free |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// paste the code in divi functions.php or upload this file on wp-contents/mu-plugins | |
function divi_wp_post_types( $custom_post_types ) { | |
$custom_post_types = get_post_types(); | |
if ( $custom_post_types ) { | |
foreach ( $custom_post_types as $custom_post_type ) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
echo 'Hello World'; | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('.flipboard').hover(function(e) { | |
$(this).find('.card').toggleClass('flipped'); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.yourelement { | |
background-image:url('yourimage.jpg'); // Use background-color for background color | |
background-position: center center; | |
background-size: cover; | |
background-repeat: no-repeat; | |
width: 100vw; | |
position: relative; | |
margin-left: -50vw; | |
left: 50%; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter( 'woocommerce_get_price_html', 'woo_prefix_text', 100, 2 ); | |
function woo_prefix_text( $price, $product ){ | |
/* Change FROM word to any text you want */ | |
$price = 'FROM ' . $price ; | |
return apply_filters( 'woocommerce_get_price', $price ); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> | |
<style> | |
.videoWrapper { | |
position: relative; | |
padding-bottom: 56.25%; /* 16:9 */ | |
padding-top: 25px; | |
height: 0; | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function remove_single_product_link( $html ) { | |
return strip_tags( $html,'<img>' ); | |
} | |
add_filter('woocommerce_single_product_image_thumbnail_html','remove_single_product_link' ); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Add this to functions.php */ | |
add_filter( 'woocommerce_shortcode_products_query', 'woocommerce_shortcode_products_orderby' ); | |
function woocommerce_shortcode_products_orderby( $args ) { | |
$standard_array = array('menu_order','title','date','rand','id'); | |
if( isset( $args['orderby'] ) && !in_array( $args['orderby'], $standard_array ) ) { | |
$args['meta_key'] = '_price'; | |
$args['orderby'] = 'meta_value_num'; |