PHP

Create WooCommerce Orders Programmatically

To create WooCommerce orders programmatically in WordPress, you can use the `wc_create_order()` function provided by WooCommerce. This function allows you to create orders and add products to them. Make sure you have WooCommerce installed and activated in your WordPress environment. Here’s a step-by-step guide:

Read More

Calculate distance between 2 address using latitude and longitude

To calculate the distance between two locations using their latitude and longitude coordinates, you can use the Haversine formula. The Haversine formula is commonly used to calculate the great-circle distance between two points on the surface of a sphere (such as the Earth) given their latitude and longitude.

Read More

Jquery Form Validator With User Name Exist User Email Exist

To implement jQuery Form Validator with the specified validation rules, including required, minlength, email, equalTo, custom validation, confirm password, username pattern, email existence in the database in WordPress, and username with no numeric value, you’ll need to combine client-side validation using jQuery Form Validator with server-side validation using PHP and WordPress functions.

Read More

Adding Sidebar In WordPress Theme

Adding a sidebar to a WordPress theme involves modifying the theme files and registering a new sidebar area using WordPress functions. Below are the general steps to add a sidebar in WordPress themes:

Read More

WordPress Ajax login

To implement Ajax login in WordPress, you can follow these steps: 1. Open the theme’s functions.php file in your WordPress theme directory. 2. Add the

Read More

How To Limit Search To Only Post Titles?

I added a text field to the posts filter form and I use s= parameter to make the search work. But how to search only in the title of the post (not in the content)? how to limit search to post titles? How to search only by Post Title?

Read More
Categories