This file contains hidden or 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_theme_support( 'post-thumbnails', array( 'post','news-posts') ); | |
add_image_size( 'news_post_thumb', 200, 200, true ); |
This file contains hidden or 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_action( 'wp_enqueue_scripts', 'load_touch_punch_js' , 35 ); | |
function load_touch_punch_js() { | |
global $version; | |
wp_enqueue_script( 'jquery-ui-widget' ); | |
wp_enqueue_script( 'jquery-ui-mouse' ); | |
wp_enqueue_script( 'jquery-ui-slider' ); | |
wp_register_script( 'woo-jquery-touch-punch', get_stylesheet_directory_uri() . "/js/jquery.ui.touch-punch.min.js", array('jquery'), $version, true ); | |
wp_enqueue_script( 'woo-jquery-touch-punch' ); | |
} |
This file contains hidden or 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
/** | |
* Set a custom add to cart URL to redirect to | |
* @return string | |
*/ | |
function custom_add_to_cart_redirect() { | |
return 'http://www.yourdomain.com/your-page/'; | |
} | |
add_filter( 'woocommerce_add_to_cart_redirect', 'custom_add_to_cart_redirect' ); |
This file contains hidden or 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 | |
global $woocommerce; | |
$currency = get_woocommerce_currency_symbol(); | |
$price = get_post_meta( get_the_ID(), '_regular_price', true); | |
$sale = get_post_meta( get_the_ID(), '_sale_price', true); | |
?> | |
<?php if($sale) : ?> | |
<p class="product-price-tickr"><del><?php echo $currency; echo $price; ?></del> <?php echo $currency; echo $sale; ?></p> | |
<?php elseif($price) : ?> |
This file contains hidden or 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
/** | |
* Change on single product panel "Product Description" | |
* since it already says "features" on tab. | |
*/ | |
function devswave_product_description_heading() { | |
return __('YOUR CUSTOM TITLE', 'woocommerce'); | |
} | |
add_filter('woocommerce_product_description_heading', | |
'devswave_product_description_heading'); |
OlderNewer