Where are customizer settings stored in db for wordpress theme?

How to clone customizer settings in child theme from parent theme? The customizer data is stored in table wp_options under option_name theme_mods_THEME-NAME you can view all such settings via the following query: SELECT * FROM `wp_options` WHERE `option_name` LIKE "theme_mods_%" In some cases, you just want to use parent theme’s settings in newly added child theme. If that is your case too, use the following queries to utilize and close those settings for your child theme also. ...

May 6, 2021 · 1 min · Harshvardhan Malpani

Gravityforms limit submission – once for user, unlimited for guest

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 public function context() { // rule targets specific user, if this user is different we don't need to test the rule if ( $this->user_id != 'all' ) { if ( $this->user_id != get_current_user_id() ) { return false; } } if($this->user_id == "all") { if(get_current_user_id()===0) { return false; } } return true; } File: gp-limit-submissions/includes/GPLS_Rule_User.php ...

October 22, 2020 · 1 min · Harshvardhan Malpani

How to add Buy Now button on Product page – WordPress/woocommerce?

Change && to && add_filter('woocommerce_add_to_cart_redirect', 'malpani_redirect_checkout_add_cart'); function malpani_redirect_checkout_add_cart() { if (isset($_POST["buynow"]) && $_POST["buynow"] === "2") { return wc_get_checkout_url(); } } add_filter('woocommerce_after_add_to_cart_button', 'malpani_add_buy_button'); function malpani_add_buy_button() { echo '<input id="buynowinput" name="buynow" value="1" hidden> <button type="button" id="buy_now" class="buy_now button">Buy Now</button> <script> jQuery(document).ready(function ($) { $("#buy_now").click(function (e) { $("#buynowinput").val(2); $(".single_add_to_cart_button").click(); e.stopPropagation(); e.preventDefault(); }) }); </script>';

October 7, 2020 · 1 min · Harshvardhan Malpani

How to get Gravity forms entry value by label?

function harsh_get_value_by_label( $form, $entry, $label ) { foreach ( $form['fields'] as $field ) { $lead_key = $field->label; if ( strtolower( $lead_key ) == strtolower( $label ) ) { return $entry[ $field->id ]; } if($field->inputs != null and count($field->inputs)) { foreach($field->inputs as $children) { $subLeadKey = $children["label"]; if ( strtolower( $subLeadKey ) == strtolower( $label ) ) { return $entry[ $children["id"] ]; } } } } return false; }

October 3, 2020 · 1 min · Harshvardhan Malpani

How to migrate Customers from Magento2 to WordPress?

Lets break it into 2 parts: a. Migrate Customer data b. Migrate Customer Passwords 1) Migrate Customer Data from Magento2 to WordPress This is rather easy to be honest, there are several plugins for importing data from CSV and then mapping the CSV fields. My recommended plugin is Customer/Order/Coupon CSV Import Suite by SkyVerge It basically does everything from customer email to customer address data. It also provides column mapping and custom attribute import for all users. Also comes with multiple configuration options. ...

January 1, 2020 · 2 min · Harshvardhan Malpani

Testing Configuration for Paytm Gateway Plugin India

Paytm Payment Gateway Testing Data Online payment solutions for all your transactions by Paytm Woocommerce Plugin Download the plugin here: https://github.com/Paytm-Payments/Paytm_Woocommerce_Kit Enable/Disable Enable/Disable Enable Paytm Payments. Title Title Paytm This controls the title which the user sees during checkout. Description Description The best payment gateway provider in India for e-payment through credit card, debit card & netbanking. This controls the description which the user sees during checkout. Merchant Identifier Merchant Identifier Merchant Id Provided by Paytm ...

February 7, 2019 · 2 min · Harshvardhan Malpani

Fix Error Too Many Redirects on WordPress Admin page or Blog

There are several cases for the cause and multiple solutions also: 1 Add these 2 lines in wp-config.php file if (strpos($_SERVER['HTTP_X_FORWARDED_PROTO'], 'https') !== false) $_SERVER['HTTPS']='on'; 2 Edit these settings in database directly using PhpMyAdmin in table options or wp_options in option_id, option_name (1,siteurl) and (2,home) wp_options table 3 You can do the same by Editing wp-config.php and adding these 2 lines define('WP_HOME','https://example.com'); define('WP_SITEURL','https://example.com'); 4 Fix your .htaccess file with default one Check here for default .htaccess for wordpress

December 27, 2018 · 1 min · Harshvardhan Malpani
CMS

Top CMS out there in 2018.

CMS: A content management system is a software that helps us to manage our content and site. You can literally manage everything from a blog to an e-commerce site, using CMS. You can manage an article if you have a blog, or manage your product if it is an e-commerce business. It has made our life so easier that we just can’t imagine having a site without CMS. You can operate most CMS out there even if you have no prior technical knowledge. ...

October 25, 2018 · 3 min · Harshvardhan Malpani
wp difference

WordPress.com v/s WordPress.org : The difference.

WordPress: The most popular CMS, yet there is one thing that keeps on confusing the newbies. And that is the difference between wordpress.com and wordpress.org. I myself have been confused about the difference, which once made me choose the wrong one. (as per my needs.) But I don’t want this to happen with you, hence here is an article to clear this thing out. What’s the difference: The very first difference is in the domain extension. ...

October 21, 2018 · 2 min · Harshvardhan Malpani

Default .htaccess file for wordpress with compression and caching tweaks

Here is the default .htaccess file for wordpress If you are using cpanel, before you proceed make sure that you don’t have htaccess file already. Default File Manager settings in cpanel make it hidden Default Settings in cPanel File Manager .htaccess file – default code for wordpress # BEGIN WordPress <ifmodule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </ifmodule> # END WordPress If your WordPress Installation is inside a directory say knowledge, which means your wordpress url is https://abcd.com/knowledge/ then htaccess code would be ...

October 9, 2018 · 2 min · Harshvardhan Malpani