Latest Website Snippets
Add Handling Fee to certain shipping method in Woocommerce
Category: WoocommerceYou can achieve this by adding a custom function to your WordPress theme's functions.php file. This...
Disable Wordpress default login url and set a custom one
Category: WordpressHow to disable the default Wordpress urls, /wp-admin and /wp-login</em...
Redirect Wordpress default login url to a custom page
Category: WordpressIn WordPress, you can use the login_init action hook along with the <str...
Redirect Wordpress default registration url to a custom page
Category: WordpressIn WordPress, you can use the login_init action hook along with the wp_redirect...
Hide a specific shipping method in Woocommerce when Free shipping is available
Category: WoocommerceIn Woocommerce if you want to hide a specific shipping method (identified by its instance ID) when the cart total is...
WooCommerce - redirect to previous page after login
Category: WoocommerceThis code snippet uses PHP sessions to store and manage the referring URL (referer URL) when a user attempts to log i...
Redirect 404 pages to the home
Category: WordpressCreate a custom WordPress function to redirect 404 pages to the home page by adding the following code to your theme'...
Wrapping embedded images with an image-container class in all posts
Category: WordpressWe can use jQuery to wrap the images under the specified class with a div having the class image-container. Here's a...