Simple parallax effect with no need of plugins. Give an element absolutely positioned an #id or .class and fire up the javascript.
A Pen by Adriano Monecchi on CodePen.
| /** | |
| * Respond Tutorial by Mat Helme on TreeHouse Blog: | |
| * http://blog.teamtreehouse.com/create-an-absolute-basic-mobile-css-responsive-navigation-menu | |
| */ | |
| /*RESET*/ | |
| html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td {margin:0; padding:0; border:0; outline:0; font-size:100%; vertical-align:baseline; background:transparent;} body {line-height: 1;}ol, ul{list-style:none;} blockquote, q{quotes:none;} blockquote:before, blockquote:after, q:before, q:after{content:'';content:none;} :focus{outline:0;} ins{text-decoration:none;} del{text-decoration:line-through;} table{border-collapse:collapse; border-spacing:0;} | |
| /*MAIN*/ | |
| body { |
| <form id="contact-form" action="//formspree.io/[email protected]" method="post"> | |
| <input type="text" name="Name" placeholder="Name" required> | |
| <input type="email" name="Email" placeholder="Email" required> | |
| <textarea name="Message" cols="30" rows="6" placeholder="Message" required></textarea> | |
| <!-- CONFIG --> | |
| <input class="is-hidden" type="text" name="_gotcha"> | |
| <input type="hidden" name="_subject" value="Subject"> | |
| <input type="hidden" name="_cc" value="[email protected]"> | |
| <!-- /CONFIG --> | |
| <input class="submit" type="submit" value="Send"> |
Simple parallax effect with no need of plugins. Give an element absolutely positioned an #id or .class and fire up the javascript.
A Pen by Adriano Monecchi on CodePen.
| #!/usr/bin/ruby | |
| # | |
| # This script fixes /usr/local only. | |
| # | |
| # 6th January 2010: | |
| # Modified the script to just fix, rather than install. - rpavlik | |
| # | |
| # 30th March 2010: | |
| # Added a check to make sure user is in the staff group. This was a problem | |
| # for me, and I think it was due to me migrating my account over several |
| // Original Source : http://www.elftronix.com/add-css-class-directly-to-wordpress-menu-item-link/ | |
| // This is modified version of code from elftronix.com | |
| // -1 will add custom CSS class to every menu item, while if you will use 1 ut will add Custom css classs to 1st link only. | |
| // normally WordPress themes apply CSS classes to UL and li not a links, that's why you can use this code to add class to anchors. | |
| // i used this code to apply .mdl-navigation__link class from Material Design Framework to anchors, when i was creating WordPress theme with material design. | |
| //Step 1 : Add this to register functions.php navigation menu |
| // Redirect customers to another page with your personal thoughts and thank you message instead of woocommerce default thank you page. | |
| add_action( 'template_redirect', 'wc_custom_redirect_after_purchase' ); | |
| function wc_custom_redirect_after_purchase() { | |
| global $wp; | |
| if ( is_checkout() && ! empty( $wp->query_vars['order-received'] ) ) { | |
| wp_redirect( 'http://www.yoururl.com/your-page/' ); | |
| exit; | |
| } | |
| } |
| <?php | |
| /** | |
| * Add order again button in my orders actions. | |
| * | |
| * @param array $actions | |
| * @param WC_Order $order | |
| * @return array | |
| */ | |
| function cs_add_order_again_to_my_orders_actions( $actions, $order ) { | |
| if ( $order->has_status( 'completed' ) ) { |
| <?php | |
| // Place the following code in your theme's functions.php file to add the shipping method to all emails | |
| add_action( 'woocommerce_email_after_order_table', 'wc_add_shipping_method_to_emails', 15, 2 ); | |
| function wc_add_shipping_method_to_emails( $order, $is_admin_email ) { | |
| echo '<p><strong>Shipping Method:</strong> ' . $order->get_shipping_method() . '</p>'; | |
| } | |
| // Place the following code in your theme's functions.php file to add the shipping methid to admin emails only | |
| add_action( 'woocommerce_email_after_order_table', 'wc_add_shipping_method_to_admin_emails', 15, 2 ); | |
| function wc_add_shipping_method_to_admin_emails( $order, $is_admin_email ) { |
| /* To use: | |
| 1. Add this snippet to your theme's functions.php file | |
| 2. Change the meta key names in the snippet | |
| 3. Create a custom field in the order post - e.g. key = "Tracking Code" value = abcdefg | |
| 4. When next updating the status, or during any other event which emails the user, they will see this field in their email | |
| */ | |
| add_filter('woocommerce_email_order_meta_keys', 'my_custom_order_meta_keys'); | |
| function my_custom_order_meta_keys( $keys ) { | |
| $keys[] = 'Tracking Code'; // This will look for a custom field called 'Tracking Code' and add it to emails |
| <?php | |
| /** | |
| * start the customisation | |
| */ | |
| function custom_woo_before_shop_link() { | |
| add_filter('woocommerce_loop_add_to_cart_link', 'custom_woo_loop_add_to_cart_link', 10, 2); | |
| add_action('woocommerce_after_shop_loop', 'custom_woo_after_shop_loop'); | |
| } | |
| add_action('woocommerce_before_shop_loop', 'custom_woo_before_shop_link'); |