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 | |
| function is_product_in_cart( $prodID ) { | |
| $cartID = WC()->cart->generate_cart_id( $prodID ); | |
| $in_cart = WC()->cart->find_product_in_cart( $cartID ); | |
| if ( $in_cart ) { | |
| return true; | |
| } | |
| return false; | |
| } |
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
| <!-- // The HTML (could be part of page content) // --> | |
| <input type="text" name="keyword" id="keyword" onkeyup="fetch()"></input> | |
| <div id="datafetch">Search results will appear here</div> |
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 | |
| /* CREATE THE NEW CUSTOM TAB | |
| ---------------------------------------------------- */ | |
| // First Register the Tab by hooking into the 'woocommerce_product_data_tabs' filter | |
| add_filter( 'woocommerce_product_data_tabs', 'add_my_custom_product_data_tab' ); | |
| function add_my_custom_product_data_tab( $product_data_tabs ) { | |
| $product_data_tabs['my-custom-tab'] = array( | |
| 'label' => __( 'My Custom Tab', 'woocommerce' ), | |
| 'target' => 'my_custom_product_data', |
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 | |
| //* New Widget | |
| genesis_register_sidebar( array( | |
| 'id' => 'after-blog-content', | |
| 'name' => __( 'After Blog Content', 'hello-pro' ), | |
| 'description' => __( 'Description of the widget goes here', 'hello-pro' ), | |
| ) ); | |
| //* Add widget after the_content() |
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 | |
| /* | |
| * This code will create a new 'list-testimonials' shortcode, which will show all testimonials in a UL list. | |
| * Add this to your theme's functions.php file. | |
| */ | |
| // Add Shortcode | |
| add_shortcode( 'list-testimonials', 'spslider_list_testimonials' ); |
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 | |
| /* | |
| * This code will enable the 'Tickets' checkbox and options on Subscription and Deposit products. | |
| * Add this to your theme's functions.php file. | |
| */ | |
| //* Remove Filter from BOX OFFICE plugin | |
| add_action( 'admin_init', 'remove_boxoffice_filter' ); | |
| function remove_boxoffice_filter(){ |
NewerOlder