Redirect User Directly to Checkout Page After Adding Product to Cart in Woocommerce

| Last Updated: | In: Code Snippets


In this tutorial, I will explain how to redirect user directly to checkout page after adding product to cart in WooCommerce. This is very simple & easy code snippets to extends the features of your WooCommerce based online store. How to redirect user directly to checkout page after adding product to cart in Woocommerce? Copy …

Add Confirm Password Field on The Register Form Under My Accounts

| Last Updated: | In: Code Snippets


If you want to add confirm field password field on the registration form under my account page, then this tutorial is specially designed for you. Please keep your close attention in this post and use the below code snippets. Add confirm password field on the register form under My Accounts Add the below code at …

How to Add Custom Fields in User Registration in WooCommerce

| Last Updated: | In: WooCommerce, WordPress


Sometimes we need to add the extra fields in the WooCommerce registration form to get some more information, which by default you can’t get from the registration page. In this tutorial, I will share how to add custom fields in user registration on the “My Account” page. There are two ways to add the custom …

Use Safely Redirect URLs in WordPress

| Last Updated: | In: WordPress Snippets


In this tutorial, I will explain how to use safely redirect URLs in WordPress. The wp_safe_redirect() function does not exit automatically, if you are using this function in your code, then you should always used the exit(). See the below example: Use Safely Redirect URLs in WordPress You can use the below code in your …

How to Remove Width and Height Attributes From Images in WordPress

| Last Updated: | In: Code Snippets, WordPress Snippets


In this tutorial, I will explain how to remove width and height attributes from inserted images in WordPress posts and pages. The images uploaded through the WordPress media uploader and inserted in your posts or pages it automatically added the width and height attributes in your image. How to Remove Width and Height Attributes From …

Always Force to Redirect HTTPS URL

| Last Updated: | In: Code Snippets


If you have recently moved your website to HTTPS from HTTP and facing the mixed content issues, or some of your site URLs are still redirected to HTTP, then you can use the below code snippets in your .htacess file. Always Force to Redirect HTTPS URL This htacess code will always force to redirect HTTPS …

Get URL Variables Using JavaScript

| Last Updated: | In: Code Snippets


This tutorial will explain how to get URL variables using JavaScript. This will help you when you want to do some operation based on the URL variables. Get URL Variables Using JavaScript Use the below JavaScript code to print the URL variable. You can use the getQueryVariable() function in your JavaScript to get the variable …

How to Use PHP Code inside HTML

| Last Updated: | In: Code Snippets, HTML / CSS


Are you want to use the PHP code inside HTML code, if your answer is “YES”, then this tutorial is designed for you. Keep your close eye on this tutorial as Ima going to share how to use PHP code inside HTML by using the simple htacess code snippets. How to Use PHP Code inside …

How to Prevent Your Site From Image Hotlinking

| Last Updated: | In: Code Snippets


In this tutorial, I will explain how to prevent your site from image hotlinking. This will help you to save your server bandwidth and cost. What is Image Hotlnking Image hotlink is the direct linking to your website’s image files to theft your server Bandwidth. Some people have used your site’s images directly on his …

How to Set Custom Error Pages Using Htacess

| Last Updated: | In: Code Snippets


If you want to design the custom error page for the server side error like 400, 401, 500, 502, and etc…, then keep your close attention in this as I am going to explain how to set custom error pages using Htacess file. Open your htacess file from root directory of your website and copy …