Categories
WooCommerce Wordpress

Require shipping calculator before proceed checkout – WooCommerce

The following code is used to prevent users to proceed checkout from cart page without filling the shipping calculator and calculate the shipping amount,

You can put the following code in your functions.php file

add_action('wp_head','prevent_proceed_to_checkout');
function prevent_proceed_to_checkout() { 
echo '	<script>
			jQuery(function(){ 	
				jQuery(".woocommerce-cart .wc-proceed-to-checkout a.checkout-button").on("click",function(e){
					var _this = this;
					alert("Please calculate shipping!");
					e.preventDefault();
					jQuery(".shipping-calculator-form .button").on("click",function(){
						jQuery(_this).off();
					});
				 });
			});
		</script>';
}
Categories
Wordpress

Sydney Slider: Use different call to action buttons for each different slide in Sydney theme

Here is the solution to add the different call to action link for each 5 five sliders in Sydney theme, by default there is only one option to add the link and button name

https://wordpress.org/support/topic/use-different-call-to-action-buttons-for-each-different-slide?replies=15#post-7894854

You can use the above code in your child theme functions.php file.

Categories
Wordpress

Wp-Admin not opening

Dear Readers,

One day our website’s wp-admin didn’t open after fill username and password then hit the login button. it was loading continuously but not able to see Dashboard but some times it took long time to open Dashboard, We searched many forums and blogs but no solutions, then we decided to open functions.php file of current theme and was looking each line one by one then we found that there was some CURL coding were there, looked that coding it was a functions to update the theme automatically once a day when admin logs into wp-admin, and  commented that function and tried to login again wp-admin, Yes, it worked successfully, we got Dashboard.

Solution:
1. Look into functions.php file of current theme
2. Look into plugins, if some plugin may download external contents or send some data to external server, If external server is slow , then our site will also be slow.