Amitpal Singh
Blog

Tutorials and code snippets

Fixes and how-tos for WordPress, WooCommerce, JavaScript, PHP and Cordova, written while building client projects.

Android App Development

How to use Ajax with Wordpress and Cordova based mobile app? Piece of code is illustrated.

HTML CSS jQuery PHP

PHP

wp_localize_script ajax url working with example tutorial

wp_localize_script ajax url working with example tutorial: wp_localize_script helps us to work with ajax submission in wordpress.

WordPress

How to index html table rows or how to Auto-number table rows?

Auto number table rows or Index table HTML rows. 1 CSS Method and 2 JS Methods to auto table html rows. Indexing can be done with these.

WooCommerce

How to require minimum image upload dimensions condition for Woocommerce Products?

Add this code to your theme’s functions.php file, and it will limit minimum image dimentions

PHP

Get total from loop in php or Sum values in foreach loop php

Sum in foreach php In your case IF you want to go with foreach loop than But if you want to go with direct sum of array than look on below for your…

PHP

Create a table in wordpress with functions.php

Create a table in wordpress with functions.php

PHP

How to insert data in wordpress database table with functions.php?

How to insert data in wordpress database table with functions.php?

PHP

How to update data in wordpress database table with functions.php?

How to update data in wordpress database table with functions.php?

WooCommerce

Get url of product's images in wordpress (woocommerce)

Get url of product's images in wordpress (woocommerce)

PHP

How to validate email using jQuery?

To validate email using jQuery, use the regex pattern. You can try to run the following code to learn how to validate email using jQuery : Function: Usage:

WordPress

Send email template with file_get_contents in wordpress

Send email template with file_get_contents in wordpress

WooCommerce

Get cart item name, quantity all details woocommerce

To get Product Image and Regular & Sale Price: