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'); |
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
/** | |
* 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
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
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
<!--NEWS SECTION--> | |
<?php | |
global $post; | |
$args = array ('post_type'=> 'news-posts','posts_per_page' =>3); | |
$the_query = new WP_Query($args); ?> | |
<?php if ( $the_query->have_posts() ) : ?> | |
<?php while ($the_query->have_posts()) : $the_query->the_post(); ?> |
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
/** | |
*Custom Post Types | |
*/ | |
function wpdevs_custom_post() { | |
register_post_type( 'news-posts', | |
array( | |
'labels' => array( | |
'name' => __( 'News Posts', 'hellothirteen' ), |
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
/** | |
* Filters wp_title to print a neat <title> tag based on what is being viewed. | |
* | |
* @param string $title Default title text for current view. | |
* @param string $sep Optional separator. | |
* @return string The filtered title. | |
*/ | |
function WpDevs_wp_title( $title, $sep ) { | |
if ( is_feed() ) { | |
return $title; |
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 | |
if ( is_home() ) { | |
query_posts( 'cat=-1,-2,-3' ); | |
} | |
?> |
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 | |
if ( is_home() ) { | |
query_posts( 'cat=-3' ); | |
} | |
?> |
NewerOlder