Your connection on this site is not fully secure

category:  WordPress

Recently, I wrote the post of how to move a WordPress site to a new host with no downtime. At that time, I moved my site from non-secure site(http://) to secure site(https://). I notice at the address bar at the Chrome browser, I don’t see the lock icon which represents the secure site. Instead, I see the info icon. When I click on the info icon, I see “Your connection on this site is not fully secure” message. Today I … Read More

How to Move your WordPress site to a New Host (with No Downtime)

category:  WordPress

Four months ago, I wrote a blog about how to move WordPress to a new host without any plugin. This method is useful if your site is big and complex and you don’t offer the RSS feeds. But if your site is small then you can use the Duplicator plugin. It provides both Free and Paid version. Plus using this plugin for moving the site, you get zero downtime.     How to use? It is really simple. Just follow … Read More

How to download the data as csv file in WordPress – deal with the PHP old version

category:  WordPress

Yesterday, I had a request to implement the download data as an excel file from WordPress. The client’s business sells wholesale and retail products. They want their partners to be able to download the product detail as PDF and Excel files. The PDF file is already implemented using the Mpdf library (I will write the mpdf tutorial sometime in the future). Today I will share with you how to implement the download as an excel file. Deal with PHP old … Read More

WordPress Security Guide

category:  WordPress

A couple of days ago, I saw a post from the Facebook WordPress group asking for help. The issue was that his WordPress site got hacked. The hacker somehow put a hidden script into the server and set the schedule to run the script every 24 hours. The unexpected code that the hacker script generated showed in the index.php at the beginning of the file. That code added a ton of external files into the WordPress media library and if … Read More

How to Move WordPress to a New Host

category:  WordPress

There are two ways that you can move the WordPress website to the new host. One is using the plugins and another is using PhpMyAdmin or other MySQL interface application. I gonna talk about moving the site without the plugins. I assume that you already have the new domain name or using the current domain name. Also, you already have the new host login (cPanel).   Here are the steps we will do. Export the database from the phpmyadmin at the … Read More

Building WordPress Plugins with Object Oriented Concept

category:  WordPress

When I develop the custom plugin, I prefer to build the custom plugin with Object-Oriented Programming(OOP) to avoid the conflict from other plugins or the themes. Plus my code is cleaner and more organized. Today I will share how to create the report plugin with OOP. Here what the plugin does: The plugin will display the data regarding the criteria. I use the datatable plugin for the data table with search, pagination and column sort features. The datatable plugin has … Read More

How to avoid jquery conflicts in WordPress

category:  WordPress, jQuery

WordPress developers know that the jQuery in WordPress runs in noConflict mode. This means when you enqueue the script that is dependent on jQuery in WordPress, you cannot use the common $ alias. To solve this issue, you can place your code using the $ shortcut inside a noConflict wrapper. Here is an example. in PHP file in JS file If you need to load the script in the header after the document is ready, you will use the code … Read More

How to pass PHP value to JavaScript in WordPress

category:  WordPress

Often when I work on the custom plugins or custom themes, I will call the PHP functions within JavaScript. I do that because I want the data that normally can access via PHP to be available on my script. In WordPress, you can call the PHP functions within JavaScript easily by using the wp_localize_script function. What it does, it allows you to get the data from the server-side to the client site. Usage: Here is an example in the main plugin … Read More

How to create the shortcode in the WordPress plugin

category:  WordPress

Create the shortcode is very simple. Only one thing you have to remember is to print out the content from the callback function. You can add the content to the variable and return this variable in the callback function. However, there may be some cases that you don’t want to store everything in one variable and return it. In this case, you can use ob_start() and ob_get_clean(). I will give you these two examples. In my tutorial, I use the class … Read More

How to make a WordPress Admin Options page without using the Setting API

category:  WordPress

Last week, I did one small task which is adding the floating survey button on the front page. At the backend, the client is able to add the link and enable or disable the survey button for the front page. I create the plugin for this feature. Below is the screenshot for the frontend and backend. Front End Back End Here is what we are going to do in this post. Create a new plugin Add the survey setting form at … Read More

1 2 3 4