Code Snippets

Enter an URL in a input field, display the URL preview using WordPress,PHP and Ajax

In this blog post, we will discuss and resolve the common feature, display the URL preview like Facebook and WhatsApp. The blog post provides two methods. Using WordPress Standards Using the Core PHP Curl. HTML Code for WordPress. If you have an existing input field, add the following input field class attribute and add the …

Check existing email address and display password strength using jQuery Ajax PHP

With the following code snippet, you can check the already used email address in the database. Code snippet help in the user registration section to avoid duplicate email address entry and avoid SQL query error as well. The code snippet includes an additional feature for register form validation. The validation code checks the password strength …

ACH (Automatic Clearing House) Dwolla API integration using Laravel

Looking for an ACH (Automatic Clearing House) payment method. Dwolla is one of the most popular payment methods. Dwolla API is providing the full detailed documentation about the payment integration methods. In this blog post, we are going to discuss the “Receive money from your users“. Check the official documentation about this section. This blog post is …

Authorize.net credit card payment integration using Laravel

Authorize.net is a very popular payment integration method. Let’s integrate it using Laravel. Authorize.net already provides an SDK for PHP. It is available on GitHub. This blog post example using the same GitHub SDK. Because it is Authorize.net approved library. 1. Create a sandbox account. The tool is required for this program that is authorize.net …

Typeahead and bloodhound autocomplete code snippet with WordPress Ajax.

This blog post cover typehead and bloodhound autocomplete script with a WordPress ajax code. The code example will render the post title list from the WordPress posts table. The example covers Javascript code, HTML basic code, and WordPress Ajax function. HTML Code: You can update this code according to your input field. Javascript code and …

Why Notice: Undefined index: items in wp-includes/rest-api.php on line

I hope you are developing something interesting in WordPress with Gutenberg Block editor. If you are facing this warning message. Generally this notice for Gutenberg array type attribute. When you register an attribute with an array type. Notice: Undefined index: items in wp-includes/rest-api.php on line 1092. I had similar trouble with it when I first …

How to add default customizer background color and background image controls inside custom section in WordPress

WordPress has a number of default Customizer panels that are in core and applied to all themes – these include Menu and Widgets as well as Site Identity and Static Front Page. Once you add_theme_supports in your themes function.php file for custom-background you get two more panels; Colors and Background Image. Move Colors and Background Image …