Auto Redirect to another page

Here’s are the simplest ways to auto redirect from one webpage to another. META Refresh meta http-equiv=”refresh” content=”0;url=YOUR-URL.COM” Javascript // will overwrite history window.location.replace(‘YOUR-URL.COM’); // will add to history window.location.assign(‘YOUR-URL.COM’); Jquery $(location).attr(‘href’, ‘YOUR-URL.COM’)

Simple DIY Web Stats

Now, there’s a lot of web stats 3rd party plugins out there. Google analytics is awesome tool to keep track of your web stats. Statcounter is another tool to keep track of site. However all those information are kept on their website and not yours. Although, you can download the logs, those 3rd party website…

Read More

Fix WordPress CORS Policy

I’ve had this error come up. “… has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.” To fix it, add this code to your .htaccess file: <FilesMatch “\.(php|ttf|ttc|otf|eot|woff|woff2|font.css)$”> <IfModule mod_headers.c> Header set Access-Control-Allow-Origin “*” </IfModule> </FilesMatch>

Woocommerce – Delete Add to Cart

Add this code: remove_action(‘woocommerce_single_product_summary’,’woocommerce_template_single_add_to_cart’, 30 ); To your Functions.php file.