A lightweight full page parallax scroll effect.
A Pen by Emily Hayman on CodePen.
| add_action( 'woocommerce_register_form_start', 'prefix_add_name_woo_account_registration' ); | |
| function prefix_add_name_woo_account_registration() { | |
| ?> | |
| <p class="form-row form-row-first"> | |
| <label for="reg_billing_first_name"><?php _e( 'First name', 'woocommerce' ); ?> <span class="required">*</span></label> | |
| <input type="text" class="input-text" name="billing_first_name" id="reg_billing_first_name" value="<?php if ( ! empty( $_POST['billing_first_name'] ) ) esc_attr_e( $_POST['billing_first_name'] ); ?>" /> | |
| </p> |
| Step 1: Add Data in a Custom Session, on ‘Add to Cart’ Button Click | |
| <?php | |
| add_action('wp_ajax_wdm_add_user_custom_data_options', 'wdm_add_user_custom_data_options_callback'); | |
| add_action('wp_ajax_nopriv_wdm_add_user_custom_data_options', 'wdm_add_user_custom_data_options_callback'); | |
| function wdm_add_user_custom_data_options_callback() | |
| { | |
| //Custom data - Sent Via AJAX post method | |
| $product_id = $_POST['id']; //This is product ID | |
| $user_custom_data_values = $_POST['user_data']; //This is User custom value sent via AJAX |
| * Disable payment gateways for shipping methods | |
| * Filter payment gatways | |
| */ | |
| function my_custom_available_payment_gateways( $gateways ) { | |
| $chosen_shipping_rates = WC()->session->get( 'chosen_shipping_methods' ); | |
| // When 'local delivery' has been chosen as shipping rate | |
| if ( in_array( 'local_delivery', $chosen_shipping_rates ) ) : | |
| // Remove bank transfer payment gateway | |
| unset( $gateways['bacs'] ); | |
| endif; |
| var jump=function(e) | |
| { | |
| if (e){ | |
| e.preventDefault(); | |
| var target = jQuery(this).attr("href"); | |
| }else{ | |
| var target = location.hash; | |
| } | |
| jQuery('html,body').animate( |
| jQuery('.menu a[href*=#]:not([href=#])').each(function(){ | |
| $('a[href*=#]:not([href=#])').click(function() | |
| { | |
| if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') | |
| || location.hostname == this.hostname) | |
| { | |
| var target = $(this.hash); | |
| var menu_href_val = $(this).attr('href'); |
| <?php | |
| get_header(); | |
| $al_cat_slug = get_queried_object()->slug; | |
| $al_cat_name = get_queried_object()->name; | |
| ?> | |
| <h2><?php echo $al_cat_name; ?></h2> | |
| <?php | |
| $al_tax_post_args = array( | |
| 'post_type' => 'Your Post Type', // Your Post type Name that You Registered |
| <?php | |
| /** | |
| * Register the Book custom post type. | |
| */ | |
| function km_register_book_post_type() { | |
| register_post_type( 'company', [ | |
| 'public' => true, | |
| 'supports' => [ 'title', 'editor', 'thumbnail' ], | |
| 'labels' => km_get_book_cpt_labels(), | |
| ] ); |
A lightweight full page parallax scroll effect.
A Pen by Emily Hayman on CodePen.