July 22nd, 2017 by admin
Warning: mysqli_query(): MySQL server has gone away in siteroot\wp-includes\wp-db.php on line 1878 and Warning: mysqli_query(): Error reading result set’s header in siteroot\wp-includes\wp-db.php on line 1878 Modify your wp-config.php file Open wp-config.php with a text editor such as Notepad. The wp-config.php file is located in your WordPress installation folder in your hosting account. If there […]
December 14th, 2016 by admin
Apply Custom CSS to Admin Area Add to the functions.php file: [php] add_action(‘admin_head’, ‘my_custom_fonts’); function my_custom_fonts() { echo ‘<style> body, td, textarea, input, select { font-family: "Lucida Grande"; font-size: 12px; } </style>’; } [/php]
December 12th, 2016 by admin
[php] function my_duplicate_post_link($actions, $post) { // The following checks WHERE we should run if not products just return if ( $post->post_type != ‘product’ ) { return $actions; } $product = get_product( $post->ID ); unset($actions[‘duplicate’]); return $actions; } // Notice priority changed from default 10 to 15(anything greater than 10) // Priority defines WHEN we should […]
December 9th, 2016 by admin
Now Google wants an API key to authenticate users to access their APIs`. You can get the API key from the following link. Go through the link and you need to enter a project and so on. But it is easy. Hassle free. https://developers.google.com/maps/documentation/javascript/get-api-key Once you get the API key change the previous [php] <pre><code><script […]
November 3rd, 2016 by admin
Showing prices without VAT based on roles Function that will check for user role and turn off VAT/tax for that role [php] function wc_diff_rate_for_user() { // check for the user role if ( is_user_logged_in() && current_user_can( ‘wholesale_customer’ ) ) { // set the customer object to have no VAT WC()->customer->is_vat_exempt = true; } } add_action( […]