The popular open-source contract for web designers and developers by Stuff & Nonsense
- Originally published: 23/12/2008
- Revised date: 15/12/2013
- Original post
| <?php | |
| if (!isset($_GET['url'])) { | |
| ?> | |
| <!DOCTYPE html> | |
| <meta charset="utf-8"> | |
| <title>Youtube RSS creator</title> | |
| <form> | |
| <p>Create an RSS feed for the videos on the following page: | |
| <p><input name="url" placeholder="E.g. https://www.youtube.com/user/scishow/videos" style="width: 30em"> |
| <?php | |
| /** | |
| * Add the field to the checkout | |
| **/ | |
| add_action('woocommerce_after_order_notes', 'my_custom_checkout_field'); | |
| function my_custom_checkout_field( $checkout ) { | |
| echo '<div id="my_custom_checkout_field"><h3>'.__('My Field').'</h3>'; |
| <?php | |
| /** | |
| * WooCommerce | |
| * -------------- | |
| * | |
| * Display cart total weight on the cart page | |
| * | |
| */ | |
| add_action('woocommerce_cart_collaterals', 'myprefix_cart_extra_info'); |
| #301 Redirects for .htaccess | |
| #Redirect a single page: | |
| Redirect 301 /pagename.php http://www.domain.com/pagename.html | |
| #Redirect an entire site: | |
| Redirect 301 / http://www.domain.com/ | |
| #Redirect an entire site to a sub folder | |
| Redirect 301 / http://www.domain.com/subfolder/ |
| define( 'WOOCOMMERCE_USE_CSS', false ); |