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 | |
| /** | |
| * Change the separator in the breadcrumb to a pipe if on single posts screens, | |
| * and display the post's categories in the single post breadcrumb in the simplest way possible. | |
| * Both of these should be done in a single filter as well (because the customer has requested it). | |
| * | |
| * Code below tested in Simplicity Theme | |
| **/ |
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 | |
| add_shortcode('custom_recent_products', 'custom_woocommerce_recent_products'); | |
| /** | |
| * Recent Products shortcode with custom styles | |
| **/ | |
| function custom_woocommerce_recent_products( $atts ) { | |
| global $woocommerce_loop; |
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 | |
| /** | |
| * Standard Tab Code from woocommerce-hooks.php | |
| */ | |
| /* Product page tabs */ | |
| add_action( 'woocommerce_product_tabs', 'woocommerce_product_description_tab', 10 ); | |
| add_action( 'woocommerce_product_tabs', 'woocommerce_product_attributes_tab', 20 ); | |
| add_action( 'woocommerce_product_tabs', 'woocommerce_product_reviews_tab', 30 ); | |
| add_action( 'woocommerce_product_tab_panels', 'woocommerce_product_description_panel', 10 ); |
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 | |
| /** | |
| * Custom Add To Cart Messages | |
| * Add this to your theme functions.php file | |
| **/ | |
| add_filter( 'woocommerce_add_to_cart_message', 'custom_add_to_cart_message' ); | |
| function custom_add_to_cart_message() { | |
| global $woocommerce; | |
| // Output success messages |
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_filter('woocommerce_billing_fields', 'custom_reorder_address_fields'); | |
| function custom_reorder_address_fields( $fields ) { | |
| $billing_first_name = $fields['billing']['billing_first_name']; | |
| $billing_last_name = $fields['billing']['billing_last_name']; | |
| $billing_company = $fields['billing']['billing_company']; | |
| $billing_address_1 = $fields['billing']['billing_address_1']; | |
| $billing_address_2 = $fields['billing']['billing_address_2']; | |
| $billing_city = $fields['billing']['billing_city']; | |
| $billing_postcode = $fields['billing']['billing_postcode']; |
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 | |
| add_action( 'widgets_init' , 'custom_remove_tabs' , 10 ); | |
| function custom_remove_tabs() { | |
| global $woocommerce_product_enquiry_form,$WooCommerce_Video_Product_Tab,$WoocommerceCustomProductTabsLite; | |
| remove_action('woocommerce_product_tabs', array( &$WooCommerce_Video_Product_Tab,'video_product_tabs'), 25); | |
| remove_action('woocommerce_product_tab_panels', array( &$WooCommerce_Video_Product_Tab,'video_product_tabs_panel'), 25); | |
| remove_action('woocommerce_product_tabs', 'video_product_tabs', 25); | |
| remove_action('woocommerce_product_tab_panels', 'video_product_tabs_panel', 25); |
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; ?> | |
| <?php if ( comments_open() ) : ?><div id="reviews"><?php | |
| // Set this to the maximum number of reviews you would like | |
| $max_reviews = 10; | |
| echo '<div id="comments">'; | |
| $count = $wpdb->get_var(" | |
| SELECT COUNT(meta_value) FROM $wpdb->commentmeta |
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 ( in_category( 'himalayan' ) ) : | |
| echo | |
| "<div class='woo-sc-hr'></div> | |
| <div class='story_blocks'> | |
| <div class='twocol-one'> | |
| <a href='#'>Himalayan</a> | |
| </div> | |
| <div class='twocol-one last'> | |
| <a href='#'><img src='http://gator685.hostgator.com/~crawles/wp-content/uploads/assets/merino-story.png' /></a> |
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 | |
| add_shortcode('soldoutproducts', 'custom_woocommerce_soldout_products'); | |
| /** | |
| * Recent Products shortcode with custom styles | |
| **/ | |
| function custom_woocommerce_soldout_products( $atts ) { | |
| global $woocommerce_loop; |
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 | |
| /** | |
| * Tab Title filters do not work with WooCommerce 1.6.5.1 or lower | |
| * Please download this zip file http://cl.ly/2Y3S3D3M3C23 , extract the 3 files and copy them to : | |
| * wp-content/themes/YOUR_THEME/woocommerce/single-product/tabs/ | |
| **/ | |
| add_filter ( 'woocommerce_product_description_tab_title', 'custom_product_description_tab_title' ) ; | |
| function custom_product_description_tab_title() { |