Import CSV file to MySQL from custom plugin in WordPress

CSV is a widely used format for data dump and bulk data uploading to the database like product details, user data, etc.

The file is consists of one or more fields in a row.

Inserting records one by one is time-consuming and if you already have data available in CSV format then you can import it with the help of PHP script.

In this tutorial, I show how you can import CSV file in your MySQL database from custom plugin in WordPress.

Import CSV file to MySQL from custom plugin in WordPress

Read more

How to Send AJAX request from Plugin in WordPress

Plugin is used to add features to the site without modifying the core code.

While building plugin you can also use AJAX to save the form after submit, retrieve data from MySQL database, file upload, etc.

In the plugin, AJAX is implemented as same as implemented on the theme.

In this tutorial, I show how you can create a custom plugin and send an AJAX request in WordPress.

Read more

How To Design a Custom Template For Pages In WordPress

In WordPress, you can easily customize the page by editing the page.php file of the active theme. But the change will affect all pages where no need for customization.

You can avoid this by creating a custom page template.

Using this you can design different-different layouts for the pages and add extra content to them without affecting regular pages on the site.

In this tutorial, I show how you can create custom template and add it to the page in WordPress.

How To Design a Custom Template For Pages In WordPress

Read more

How to send AJAX request from WordPress theme

AJAX makes easier to perform operations without submitting the form like – fetch, insert, delete records from MySQL database, file uploading, etc.

Using AJAX in WordPress is a little different. Here, need to consider two things –

  • AJAX sent URL should be admin-ajax.php.
  • wp_ajax action hooks.

In this tutorial, I show how you can handle AJAX request in your WordPress theme.

How to send AJAX request from WordPress theme

Read more