My blog shares my own experience from working and living in Thailand. Feel free to share and please kindly give me credit. Enjoy!

Generic selectors
Exact matches only
Search in title
Search in content
Search in posts
Search in pages
Filter by Categories
Life in Chiang Mai
Web Designer
Web development
Yii2.0 framework

Where To Buy Top-Quality WordPress Themes

You want a new website and you choose WordPress to be the core of your site. Next, you are looking for a quality WordPress theme and perhaps the WordPress plugins. You find a ton of WordPress themes and plugins from various sources but you are not sure which place you can buy the quality WordPress theme and plugin. Today I have the best one that I have been using it since 2013 for recommending to you. Envato Market – quality … Read More

Why I use WordPress Elementor Plugin

“Why I use WordPress Elementor plugin” Before page builder plugins were introduced to WordPress. We, WordPress developers, had to create or customize the templates for our WordPress theme. Every time a WordPress layout needs to be changed, developers have to customize the templates. Sometimes we have to create the custom fields in order to display extra content on the page. Once the page builder plugins were introduced to WordPress, developers, and designers were able to create the pages faster. However, … Read More

How to add ribbon in Elementor

Elementor is the most popular page builder for WordPress. If you are web designer or web developer like me, you will hear and see ton of articles and videos talking about Elementor. Elementor saves you a ton of time and easy to use. If you want a new widgets that are not in Elementor, you just create one for your own following Elementor Widgets docucment. Today, I have to implement the ribbon in Elementor for one of my client site, … Read More

Dental Implant in Chiang Mai

A few weeks ago, I met the dentist and I needed the implant for my tooth. However, I was shock with the cost of the implant treatment. Later on, I found out the cost breaks down into 3 parts. One is the clinic fee, doctor fee and the implant brand. The most expensive cost comes from the implant brand. First clinic that I went to, was Dent CMU Meechok which is another best professional dental clinic in Chiang Mai. All … Read More

How to import/export WordPress theme customizer settings

Today I am working on one of my client websites. The site needs to add the translation file and some customization. However, the website doesn’t use the child theme. The active theme is a paid theme. So If I want to add the translation file and change the templates for the theme, when the theme is updated, all customization will be gone. To avoid this issue, I need to create the child theme for the current theme. Now, when I … Read More

How to stop Google Analytics from tracking logged in users in WordPress

Google Analytics is a must tool for marketing. It collects a useful data from your website. It makes you understand your customers in deep. In WordPress, you can integrate Google Analytics easily by using plugins or adding the UA code to functions.php in your current theme. Sometime you will login to your website to manage your content. Google Analytics records your visits while you login too. The result is, you may see the preview URL from WordPress showing in your … Read More

How to stop Google Analytics from tracking your own visits

Google Analytics is a great marketing tool from Google. It collects the useful data from your website. It makes you understand your customers in deep. For data collection, you want to collect the real data as much as possible. You don’t want to collect your own visits. To do that, follow the steps below. Login to your Google Analytics Navigate to admin panel Once the admin panel shows up, click on Filters menu Then you will see the filters list … Read More

How to rollback WordPress theme and plugin update

Today one of the cache plugin on my site is updated. Everything seems fine until I find out some pages break. Those pages don’t load the css file correctly. The minified CSS files from the cache folder are not updated. I purge all cache but no luck. To avoid this issue, I need to rollback the cache plugin to the stable version. My situation may happen to you. You update the theme and plugins then your site breaks. Or theme … Read More

How to use MariaDB with WordPress

For the websites that run on WordPress for long time, MySQL is the main database. The default MySQL port is 3306. When you develop the websites or web applications on your computer, often you will install the solution stack for your operation system. For example, I use WampServer for Windows. WampServer provides Apache(web server), PHP(programming language), MariaDB(relational database), MySQL(relational database) and PhpMyAdmin(a administration tool for MariaDB and MySQL). Some of my projects use MySQL and some uses MariaDB. For WampServer, … Read More

Translation Service in Chiang Mai

Sometime you need the English translation service for your documents. When I applied for my Green Card for moving to USA, I needed to translate a lot of Thai documents. I used the translation service from Language Corner which locates in Nimmanhaemin road at soi 13. The staffs were helpful and the price was reasonable. All documents translated by Language Corner meet the standards necessary to be approved and accepted by Thai government offices, including the Ministry of Foreign Affairs. … Read More

How to add custom fields to quick edit in WordPress

A quick edit is one of useful feature from WordPress. It is useful when you just want to add or edit a small changes for your pages or posts without loading the whole content editor page. By default, quick edit allows you to change the title, slug, published date, password, categories, template, tags, allow comments, allow pings, post status and post sticky setting. But if you have your own custom fields and want to add them into the quick edit, … Read More

How to create custom templates for custom post type in WordPress

“How to create custom templates for custom post type in WordPress”, is one of the most popular questions from the internet. Before we build the custom template for the custom post type, you should understand how WordPress decides which template file will be used on individual page. Template hierarchy Template hierarchy is the logic WordPress uses to decide which template file will be used for each individual page. Here is a interactive template hierarchy. Note that, template hierarchy will help … Read More

How to add custom fields to your WordPress

For my work, I am often requested to do the customization for my clients. One of the most requests are adding the new custom fields to the posts or pages. The benefits for creating the custom fields are for organizing the data and grouping them. For adding the custom fields to your WordPress, there are two common ways to do. One is using the plugin and another one is using the WordPress API. In this post, I will share two … Read More

How to add tag cloud in visualization tools to your WordPress

Earlier, I wrote How To Display A Tag Cloud On WordPress, in that post, we display the tag cloud by WordPress default. In this post, I will share other ways to display the tag cloud by using the visualization tools and free WordPress plugin. Multi-column Tag Map plugin Multi-column Tag Map plugin does the good job to display the tags list. It comes with many options you can choose from. Multi-column Tag Map plugin allows you to add the tag … Read More

How to display a tag cloud on WordPress

This post, we are going to display a tag cloud on WordPress. WordPress provides the tag cloud widget by default. Below is an example of tag cloud that display by the tag widget. Change the number of tags to display By default, the tag widget displays only 45 tags. This number is a good amount to display the tags on the screen. However, you can change the number as you like. To display all tags, the number setting is 0. … Read More

How to create a custom taxonomy in WordPress

The previous post, I talk about how to create the custom post type. This post, I gonna talk about how to create a custom taxonomy in WordPress. Let’s say. I want to create the new Keyword taxonomy for my project post type. I need to create the keyword for each project. The keyword works the same way as tags for the posts. We will create our own plugin for creating the custom taxonomy. Note that, I recommend you create the … Read More

How to create custom post type in WordPress

How to create custom post type in WordPress? This is a popular question for WordPress. The custom post type extends the WordPress ability. In WordPress, there are five default post type that used by the WordPress installation which are Post(post), Page(page), Attachment(attachment), Revision(revision) and Navigation menu(nav_menu_item). More detail you can read from here. However, in some situations, you may need your own custom post type for storing your specific data such as project, researcher and more. There are two ways … Read More

Google reCAPTCHA verification failed, please try again later.

When you add the contact form or any forms on your website and web application, it is a good idea to add Google reCaptcha for protecting your website and web application from fraud and abuse. However, if your website uses the cache plugin, you may see “Google reCAPTCHA verification failed, please try again later.” error while you are trying to submit the form. Why? Check where the error comes from You can follow the steps below for identify the issue. … Read More

Your package name is invalid – Composer 2.0

I have a Yii2 project and I have been using this yii2 project since 2015. The installed version was 2.0.6. Today Yii2 releases a new version which is Yii 2.0.37. I will share with you how to upgrade Yii2 via composer. Install composer First, you need a composer in your computer. If you don’t have the composer in your computer yet, you can install the composer from this link. Update Yii2 by composer Once the composer is ready, you can … Read More

How to Add Videos to WordPress

Recently I help my client to add some videos in WordPress. If you host the video on Youtube or Vimeo, you should not have any issue for adding the videos on your pages or posts. However, if you host your video on Facebook(Facebook video) or Google drive, you may read this post. Get the embed link Let’s say, I have a video MP4 that host on Google drive and I want to add the video into my page. Below is … Read More

How to add individual column filtering in DataTable

Recently I wrote several posts related to DataTable plugin. The latest one was “How to filter data in DataTable using Ajax in CodeIgniter“. This filter solution will fit to the big data. When the end user needs to view the data, they just filter only the data they needs to view. In this post, we will fetch all data and render them on the page. We will add the individual column filtering in the DataTable. In this example, we will … Read More

SendAsDenied error when sends an email using Office365

Recently I work with one of my client WordPress websites that uses the Microsoft Office365 as mail sending. I already configured the mail sending in WordPress. Everything seems correct. However, I check the PHP error log and I found the error message says: Cause The Microsoft Office365 SMTP server is rejecting the set “From” address. Solution The email account that you set in the mail configuration, must present in “From” field of the outgoing emails. For example, you use your … Read More

How to filter data in DataTable using Ajax in CodeIgniter

When you create a web application for managing your data such as accounting, stock, and sale orders. You will need the reports which come with the filters that allow you to view only the data you need. This post will show you how to create a filter form and filter the data in Datatable in CodeIgniter. You can apply this method to other PHP frameworks. It will work the same way. If you want to learn how to integrate the … Read More

How to delete data from Datatable plugin using Bootstrap modal in CodeIgniter

Recently, I wrote two posts about adding and editing the data in the Bootstrap modal in CodeIgniter. Today I will share how to delete the data using Bootstrap modal in CodeIgniter. Let’s do it. Add new delete control in DataTable Assume you already integrate the DataTable plugin to your template. If not, you can follow this post for integrating the DataTable plugin to your template in CodeIgniter. Open your footer template and add the JavaScript code below. This script must … Read More

How to edit data from Datatable plugin using Bootstrap modal in CodeIgniter

In the last post, I wrote, “How to add data from Datatable plugin using Bootstrap modal in CodeIgniter” I show only adding new data. In this post, I will share how to edit data via Bootstrap modal. Let’s go. Add a new column for the controller in the view page In the template, we add the new column in the table tag. This table will use for the DataTable plugin. Add the edit control in the footer template Open your … Read More

How to add data from Datatable plugin using Bootstrap modal in CodeIgniter

Datatable plugin is one of the popular JavaScript plugins. It displays the data in the table style. It comes with pagination, instant search, and column sorting out of the box. However, in the user’s view, they want to be able to add, edit, or delete the data from the Datatable without leaving the current page. We can do that by using Ajax and the Bootstrap modal. In this post, I will share with you how to add data from Datatable … Read More

How To Use DataTables In Codeigniter

When you work on a web application or the back-end of your website, you often create reports for the users. The reports will display in the table style. Also, you will have the requirements from the users to add the pagination, search, ability to select the number of records per page, and export data as Excel, CSV, and PDF file. Those features can be done with Datatable plugin. What is Datatable plugin Datatable plugin is an advanced interactive control JavaScript … Read More

How To Integrate Bootstrap 4 in Codeigniter

A couple weeks ago, I wrote a CodeIgniter3 tutorial series. In the series, there is no CSS framework integrating into the application. Today, I will share with you how to integrate one of the popular CSS frameworks which are Bootstrap4 into CodeIgniter. In my CodeIgniter3 tutorial series, the application looks like this. The template was created by HTML and CSS only. In this post, we will integrate the Bootstrap 4 framework and turn the plain web page to something likes … Read More

How to enable PHP error logging in CodeIgniter

When you deploy your application to the production server, it is a good practice that you enable the PHP error logging file for your application. Because we don’t enable the PHP error reports on the production, we will create the error logging file to collect the PHP error on the production for us. In CodeIgniter, enable the error logging is simple since CodeIgniter has this function built-in. Below is the steps you can follow. Make your application/logs folder writable on … Read More

How to remove index.php from URLs in CodeIgniter

By default, the index.php will be included in the URLs as it shows below. “” You can remove the index.php by following the steps below. Apache server If you use the Apache server and have mod_rewrite enabled, you can remove the index.php by using a .htaccess file. Below is the code you will place into your .htaccess file. If you don’t have this file yet, you can create one. Next, open application/config/config.php and look for $config[‘index_page’] and remove index.php. Below … Read More

How to use auto-loading resources in CodeIgniter

if you are a web developer and familiar with the modern web framework, you may know the auto-load feature. CodeIgniter provides the auto-load feature that loads the libraries, helpers, packages, drivers, custom config files, language files, and models automatically every time the system runs. The auto-load feature is useful when you need the specific resources available throughout your application. Keep it in mind, you should load only the resources that you will need often in your application in the auto-load … Read More

How to define constants globally in CodeIgniter

When you are developing the web application, you want to set the constants that you will use in the application globally. For example, you want to set the application name, application version or salt key for encrypt the password. In CodeIgniter, it provides the place for this purpose. Constants.php In application/config/constants.php, it is a file that you can define your constants globally. In the constants.php, you will see some constants in there. Go to the end of file and add … Read More

What I normally set the index.php in CodeIgniter

When you are developing the web application, you normally develop on your localhost (your computer). You will set up your ENVIRONMENT differently from production. For example, you will display the PHP report error while you are developing on your localhost but on the production, you will disable the PHP report error. Today I will share how I normally set the index.php for my CodeIgniter project. Index.php at the webroot Below is what I normally set the index.php at the webroot. … Read More

How to enable profiling in CodeIgniter

When you are developing the application or website with CodeIgniter, you should enable the profiling feature. It will help you see the useful data such as Benchmarks, data from $_GET, memory usage, data from $_POST, URI string, class/method, active databases, HTTP headers, session data, config variables. To enable it, you will add the code to your controller. I add the profiling enable in the __construct method of my class. It is important you must add “parent::__construct()” in the __construct method. … Read More

How to Connect Multiple Database in CodeIgniter

Last week, I wrote the basic CodeIgniter3 tutorial series. I picked the CodeIgniter3 for my small web application because it is lightweight, flexible and really fast development. My project had the very tight deadline so CodeIgniter was the perfect one. I would suggest the PHP developer who never worked on the Model-View-Controller (MVC) pattern to start with CodeIgniter3. For the PHP developers who have experiences for development, can learn the CodeIgniter very quick. I learned within 2 days. In my … Read More

Creating a Web Application with PHP and CodeIgniter – Part 4 (Final)

In part 4, we will learn how to add the new data via a form. Part 4 is the final part of the CodeIgniter3 tutorial series. In part 3, we can read the data from a database using Query Builder from CodeIgniter. We create the database and table via phpMyadmin. We, also add a new record in the table via phpMyadmin. In this part, we will add a new record via an adding form. Create a form In this part, … Read More

Creating a Web Application with PHP and CodeIgniter – Part 3

In part 3, we will learn how to create a Model, View, and Controller in CodeIgniter. Also, we will learn the routing. Setting up a model Models are the place where you retrieve, insert, and update data in your database. Basically, the Models represent your data from your database. The example in this part 3, it comes from CodeIgniter tutorial website. If you like to read more detail, you can visit that tutorial. In part 3, I intend to keep … Read More

Creating a Web Application with PHP and CodeIgniter – Part 2

In part 2, we will learn what is MVC pattern. Model-View-Controller (MVC) CodeIgniter is based on the Model-View-Controller development pattern aka “MVC“. MVC is a software approach that separates application logic from presentation. Model The Model represents the data structures (tables in your database). The model classes will contain functions that retrieve, insert and update the data in your database. View The View is the information that is showing to a user. Normally the View is a web page. Controller … Read More

Creating a Web Application with PHP and CodeIgniter – Part 1

A few weeks ago, I was assigned a new project. The requirements were to create a new small application in a tight deadline. The application needed to be secure, lightweight, fast, and quickly adding new features in a small amount of time. I came up with some PHP frameworks (CodeIgniter3, Yii2, CakePHP, and Laravel) and JS frameworks (Reactjs). In the end, the winner was CodeIgniter. If you are a PHP Developer, you may hear one of the popular PHP frameworks … Read More

How to create a WordPress child theme

If you are planning to do the customization (change the templates, CSS, or add more functionalities) on your site and your site is built by WordPress. You should create a child theme. Today, I am going to share “How to create a WordPress child theme”. What are the benefits of the child theme Keeping the changes you make after theme updates: If you change the templates, CSS or adding more functionalities to the active theme then the theme is updated, … Read More

Health Insurance for Long Stay Visa in Thailand

Since 31 Oct 2019, foreigners applying for a Non O-A visa will be required to purchase health insurance during staying in Thailand. Requirements According to the official immigration website, the requirements of health insurance are below. Applicants are required to have 40,000 baht outpatient coverage and 400,000 baht inpatient coverage. Health insurance for Non O-A visa in Thailand since 31 Oct 2019 Only Non O-A visa is required to purchase health insurance I called Chiang Mai immigration and spoke to … Read More

10 Most Popular Types of Websites

When building a website, you should identify what type of website you need. The most popular types of websites are: E-commerce Blog Business Media/Entertainment Portfolio Educational Crowdfunding Non-profit Vlog Community Forums # E-commerce website E-commerce, also known as online shopping, is a website where visitors can directly buy the products and services. Also, the product can be both physical and digital products. Digital products are music, movie, WordPress themes, and WordPress plugins. Examples of e-commerce websites are Oriental Decor and … Read More

What You Need to Build a Website – Checklist

To build a website, there are 4 things you need. Domain Name Business Email Address / Contact Email Address Platform Web Hosting # Domain Name What is a domain name A domain name is a digital address for your website. It is where people can find and access your website. For example, my domain name is When you type “” into browsers such as Chrome, IE, Firefox or Safari and hit the enter key, you will see my website … Read More

How to fix WordPress not sending Emails issue

Issues with email sending are some of the most common questions that I have from my clients. Often, the clients are not seeing any of the expected WordPress notifications. This is usually due to problems with their server configuration or their contact form configuration. # Server configuration WordPress is built in PHP which is one of the most popular server script languages. WordPress uses the PHP mail function to send out the emails. Normally, web hosting that supports PHP and … Read More

Why you need LiveChat for your website

Have you ever used LiveChat to ask some questions before buying the products or services? Have you ever used LiveChat for getting your support? If the answer is no, let’s read on. LiveChat is not new. It is been around for over 10 years. LiveChat helps many businesses grow. You may be one of them. What is LiveChat? LiveChat is an online customer service software with live support, help desk software, and web analytics capabilities. Below it shows how LiveChat … Read More

How to Create a Custom WordPress Widget

In the previous post, I talked about how to create the custom sidebar. Today, I will talk about how to create custom widgets for the sidebar. You can add the PHP code below into your functions.php in your child theme or create the new widgets plugin which is the same concept as the previous post. In this post, I will add the PHP code into the functions.php in my child theme. That’s it. When you navigate to Appearance>Widgets, you will … Read More

How to create a custom WordPress sidebar

The sidebar is one of a popular feature on the website. Often, it uses for blog or news page. Some WordPress themes provide the ability to add the new custom sidebar for the theme. But some don’t. If your current theme doesn’t provide the ability to add a new sidebar on your site, you have two options to do. Option 1: Using the plugin. You can use the Custom Sidebars plugin which is free. Option 2: Add the new custom … Read More

How to install and enable Memcache in WAMPserver

Lately, I work on the WordPress website that my client enables Memcache on their site. In order to develop the features and have the full test on my localhost. I need to install Memcache on WAMPserver. Today I am gonna share how to install and enable Memcache on Wamp. I assume you already have Wampserver installed on your computer. If you don’t install WAMPserver yet, you can download and install it from this link. Let’s do it download the Memcache … Read More

How to transfer data from an old PC to a new PC for Windows 10

Recently I bought a new laptop and I want to transfer all the data from my old laptop to the new laptop. My new laptop is already had Windows 10. So what I need, I just need to transfer the important data from my old laptop to the new one. My old data is around 345 GB. Here the methods that you can transfer the data between computers Using a USB data link Since I live in Thailand, I can … Read More

Owl Carousel plugin – jQuery carousel slider with fully customizable and responsive

A carousel slider is another popular feature that you see often on the website. Often you will see the carousel feature on the travel agency website, e-commerce website, business website and portfolio website. There are so many slider plugins in the market but today we will talk about an Owl Carousel plugin which is one of the popular sliders in the market. The plugin can display the image and video. Why use the Owl Carousel plugin? Fully customizable Touch and … Read More

How to add Google font to mPDF

A few days ago, I added the Open Sans font which is a Google font into the mPDF library. My client uses mPDF 6.1. It is super easy. Here the steps you can follow. Download the custom fonts you want. For example, we want to add the Open Sans font. You can download the font files from here. Once the downloading file is complete. You will extract that download zip file. Then you will see the OpenSans-Bold.ttf, OpenSans-BoldItalic.ttf and so … Read More

Export the data as Excel file in WordPress

Last month, I had a request from my client to create the export data as the excel file in WordPress. The client has their own server and they wanted to focus on memory usage. Plus, the client uses the PHP 5.5 which is pretty old. I found one PHP class that met the client’s requirement. The PHP class is PHP_XLSXWriter. Let’s say, we create an archive download template in which the download is a custom post type. On the template, … Read More

Create a custom table plugin in WordPress

For WordPress, most of the time you can create the custom post type, custom taxonomy or custom category that fits your need. But sometimes you may need your own table structure to store your data. For example, you sync the data from the external system into WordPress. Today I gonna share with you how to create a simple custom table via the plugin. In this tutorial, we will do three steps below write a PHP function that creates a database … Read More

How to pass Javascript value to PHP in WordPress

Working on customization in WordPress sometimes we need to pass the PHP value to Javascript or Javascript value to PHP. Today I will share how to pass Javascript value to PHP in WordPress. Let says we have a criteria form in which the users can fetch the data by the criteria. The data will query from the database by PHP and display on the screen as it shows below. We actually take the sample from one of my posts here. … Read More

How to transfer the domains with websites, emails and calendar data from GoDaddy to 1and1

Recently I get a request to transfer a domain, website, email account and calendar data from GoDaddy to 1and1. The current situation is my client hosts the domain name, website and email accounts on GoDaddy. On 1and1, they host the web applications that associate with the subdomains. On 1and1, the client sets their domain as the external domain. Important note When you transfer your domain to a different provider, usually only the domain itself is transferred. The following are not … Read More

Export your email, messages and calendar data – Migration

Last week, I had a request from my client to transfer the domain as well as all email accounts from GoDaddy to the new host provider. The email accounts are set at the workspace email. In order to transfer the email accounts including the calendar data, I need to export the email accounts and calendar data manually. You need to export the emails and calendar data before transferring the domain. Export the emails and email messages For exporting the email … Read More

How to update NodeJS and NPM to the latest versions

Lately, I am starting to work on the Vuejs project. I installed NodeJS and NPM before but now I want to update them to the latest version. Today I would like to share with you. Update NPM to the latest version First, open your terminal then run the command line below. Check NPM version My result of the command is 6.4.1 Then runs the command below for update the NPM to the latest version Check NPM version again My result … Read More

Search by Custom Fields without a plugin

Lately, my client requires me to add the ability to search by custom fields at the backend. Today I gonna share what I did. There are three filters we will use. posts_join posts_where posts_distinct Below what page will be implemented. You can add the code below into functions.php or your own plugin. $_GET[‘s’] is the search input on the edit page. The posts_distinct filter is needed to prevent duplicate data. Yeap! that’s it. If you are looking for adding the … Read More

How to add a new column with Yii2 migration on a specific table

Today I want to add a new column into the existing table in Yii2. Instead of adding the new column via the model I prefer to add the new column via the Yii2 migration script. With a script, I can easily revert the scrip in the command line. In order to work with the migration script, we will use the command line via the terminal. I use the bash terminal via VScode. You can use any terminal as you prefer. … Read More

How to Add Additional Custom Fields into WooCommerce Checkout Page

Woocommerce plugin is one of the most popular e-commerce plugins for WordPress. The core fields on the checkout page are very common. Most of the time, my clients ask for adding new fields and remove the core fields out of the checkout page. Today I gonna share how to add new custom fields and remove the core fields from the checkout page. Below is what we gonna do create a new custom plugin remove some core fields from the checkout … Read More

Common Git Commands

Today it was a raining day. I was cleaning my repositories on GitHub and bitbucket. So it is a good chance that I can share the common git commands here. Common Git Commands git config git init git clone git add git commit git diff git reset git status git log git branch git checkout git merge git remote git push git config It is a git configuration values on a global project level. Executing git config will modify a … Read More

Add Embedded Videos to WordPress and Make Them Responsive

Recently, I got a request from my client to add the video into WordPress. Plus the video must be responsive. Today, I gonna share with you how to implement it. IFRAME & HTML For the iframe responsive, we need a <div> or any HTML tag that is a block style (display:block) wraps the iframe. Below, we add the <div> with video-container class which we will add the style later. STYLESHEET (CSS) Adding the style to our video-container. We set position … Read More

Gitflow for a complex project

Last month, I had to work on the complex WordPress website and I had to work with other developers. The source code stores in GitHub since it is easy to use and organize for me. In order to connect to GitHub, you have to use Git which is a modern version control system. With Git, you can push and pull all changes to the repositories on Github. For my development, I use Visual Studio Code editor which is my favorite … Read More

The essential skills every web developer should have

Recently I was asked by some startup CEO how to recruit the right web developer for fulfilling the experienced web developer position. This person should be able to manage multiple projects and time. He or she should be able to communicate well both with the team and clients who have a non-technical background. Additional, he or she should be able to learn the new technologies that are coming into the market every year. Before going through the list, I would … Read More

Add new font into yii2-mpdf extension

In the Yii2 framework, you want to print or export the data as a PDF file. One of popular extension is yii2-mpdf. The extension uses an mPdf library. The extension is easy to use and the document is provided. However, if you want to add a new custom font in order to use in the Pdf file, no document in yii2-mpdf extension is provided. You have to look at the document of the mPdf library instead. For an experienced web … Read More

HTML1506: Unexpected token in IE

Yesterday, I received a support task from one of my clients. It was urgent because the users could not buy the product online. The issue occurred only in the IE browser(IE11 and IE edge). I checked the error message at the console and I found “HTML1506: Unexpected token“. I saw the same error back in 2015 when I worked with another client in the USA. This error is very common in IE. The cause The sample of JS code that … Read More

Filter Posts by Custom Taxonomy in Admin area in WordPress

Let’s say we have a custom post type called “hotels“. We create the custom field named “country” and “rating” and add both fields into the “hotels” post type. In the Hotels page at the admin area, it shows hotel title, country, rating, author and date columns as the screenshot below. There are two hooks that involve in this solution. One is ” restrict_manage_posts” and another one is “parse_query “. The restrict_manage_posts hook will add the dropdown filter at the admin … Read More

Localhost is not is the list of supported domains – reCaptcha issue

Google reCaptcha is a free service that protects your site from spam and abuse. It is easy to set and use on any website. If you are a web developer and you migrate the existing site to your localhost. When you are developing the website on localhost, on the form that you integrate the reCaptcha(V2 or V3) shows you, the error says “Localhost is not is the list of supported domains“. Well, there is a reason why and a solution … Read More

How to increase the maximum upload filesize in WordPress

Last year, I wrote, “How to increase the maximum file upload size in Multisite WordPress Network with WHM“. Today I gonna share how to increase the maximum file upload size in WordPress(Not Network site). The screenshot below shows where we will set today. What we are looking for three settings below memory_limit post_max_size upload_max_filesize From the frontend, you can add this PHP code into your PHP file. This file will print out all PHP settings for your site. Beware this information … Read More

Google SiteKit for WordPress

If you are working on online marketing or SEO, you should know the traffic tracking tools. One of the popular online tools is Google services such as Search Console, Analytics, AdSense and PageSpeed Insights. For WordPress, there are some good plugins to help you integrate Google product into your WordPress site. But those plugins don’t include all Google services. They offer only Google Analytics. But now you can add all Google services related to the website with SiteKit by Google. … Read More

Introduce affordable hosting with Awesome support

Last month, I switched from old hosting to InterServer hosting. I found out the InterServer hosting is the best choice for the freelancer, individual or small business(business website, e-commerce website, a non-profit website, student website). Why do I say that? Here are my reasons. Affordable hosting & Price Lock Guarantee I did some research and compare the shared hosting plan from the popular shared hosting plans such as Bluehost, HostGator, Hostinger, and GoDaddy. All the popular shared hosting plans of … Read More

How to add another new domain to your host

Let’s say, you have a shared host that allows you to add more than one domain. You already have one domain set up with your host plan and you want to add one more domain. Today I gonna share with you how.     What you need to have before continuing Your new domain login. Once you bought a new domain, you will have your domain login. For example, if you register at, you will have a NameCheap login … Read More

How to create the REST API with Slim framework

What is API? API, you may hear about it often nowadays. API stands for an application programming interface. It lets your product or service communicate with other platforms. For example, you have your own custom application or custom website and you want to exchange your data with the Facebook app or mobile application or other applications, you can create your own API and allow those platforms to access your data that you want them to access. For the business standpoint, … Read More

Your connection on this site is not fully secure

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)

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

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

How to install multiple PHP and MySQL versions on WAMPserver

Recently I am working on the WordPress site from a new customer. The client’s server is using PHP5.5.38 which is an old version. The newest version is 7.x.x. However, the client doesn’t want to upgrade the PHP version yet. In order to develop and support smoothly, I need to install the PHP 5.5.38 in my localhost. So when I develop, I will be sure nothing will break when I deploy to the client’s server. For my development environment, I use … Read More

WordPress Security Guide

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 Point a Domain Name to Your Site

“How to Point a Domain Name to Your Site” is a normal question that my clients ask me often. Most of them don’t have any knowledge of web technology. They don’t know that domain name and web hosting can host in a different place but they can work together. Let me explain in plain English. A domain name is an address URL that allows people can visit your website from the browsers(Chrome, IE, Firefox are browsers). The same idea that … Read More

Dev domain name with an SSL certificate

If I remember right, since 2017, the .DEV is intended to be a secure namespace, so all potential .DEV domain owners must secure their website with an SSL certificate. Even you create the virtual host on your own localhost or server. The modern browsers will automatic add https for your dev domain. More information can be found here. I write the post to remind myself or others who create the dev domain name and find out the https is added … Read More

D.I.Y Air Purifier in 10 sec

This year, the air pollution in the North of Thailand is the worst in the history. Chiang Mai air quality hit the first ranking of World AQI chart last month. That how the air pollution was bad here. This is the first time for me to hear PM2.5 from the news and social network every single day until now. Below is the AQI virtual map on 16 Apr 2019 at night time. A few weeks earlier, there were so many … Read More

Living in Thailand with Termite

Living in Thailand, you may see or hear people has a termite problem. In Thailand, we build the house with the concrete(mixing between cement and sand) and steel. A few of houses built by half concrete and wood which are the old house that are probably more than 30 years old. Termite nest can be found under the house ground and under the big tree. 90% of house damage comes from the nest under the ground. They eat anything with … Read More

How To Automatically Delete Forwarded Emails in CPanel

Lately, I set up a new host as well as the email accounts for my client. The host I use it is the Siteground. The host is really great. I have been using it for another e-commerce website(the site includes more than 5000 products) for a year without any issues. However, the plan that I bought the email storage is limited around 4 GB for each email account which is quite small for the small business. The solution that I … Read More

How to set the application timezone and MySQL for Yii2

I built my own application in 2017 when I lived in the USA and all my clients were American. The timezone that I set at that time is Pacific timezone. In 2018, I moved back to Thailand and I need to set a new timezone. I will share how to set the timezone in MySQL and PHP in the Yii2 application. My host is a shared host so if you have the dedicated host it will work as well. Set … Read More

How to Move WordPress to a New Host

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

How to clear the assets cache in Yii2

With Yii2, it comes with the asset management calls asset bundle. An asset bundle is simply a collection of assets located in a directory. When you register an asset bundle in a view, it will include the CSS and JavaScript files in the bundle in the rendered Web page. Below is my asset bundle setting in my application. I use the advanced template from Yii2 and I use the frontend for my application(backend, console, and frontend folders are generated from the advanced … Read More

How to save the multi-records in one model in a single transaction in Yii2

Recently I just add the new feature on my application. What new feature does, it generates the new invoice from the time-sheet. This way, my clients can see my log time and note on each task. So they know in detail what I did for their project. The steps are: get the time-sheet data filtered by the specific client, date range and unbilled status In the time-sheet loop, insert the new invoice and invoice detail If something goes wrong while … Read More

How to export database from Yii2 application

The export database feature is nice to have for backup and restore the database from either website or web application. I added the export database in my application using the PHP based MySQL dump library. I did the search and found more two ways to achieve my goal but they have the issue with the null value and text data type. One of the two ways is to generate the insert script with PHP which can not generate the insert script … Read More

How to create the bulk action in Yii2

Howdy, working in the back-end in the web application, often you will find the bulk actions is very useful when you want to do the action with more than one record at once. Today I will share with you how to create bulk actions and work with grid view widget. Plus I use the pjax widget to make the changes from the action without reloading the whole page. The screenshot below shows the bulk action in Yii2 Here is what … Read More

How to create the module in Yii2

Recently I have been adding the new features to my own application. I add new features using the module so I can disable and enable each module easily in the application configuration. The module is a self-contained software unit that contains models, controllers and views and components. I prefer to use Gii module to create the new module. I set up my application with the advanced template and I build my application in the frontend root. Gii module URL(with enabling … Read More

How to remove the extension or package with composer

Often when I work with the PHP framework and I want to install the extensions or packages in general term, in order to use in the framework, for PHP, we use composer. In js framework, you will use npm or yarn. To install the extensions, the third party(extension owner) page will let you know the installation composer command. But often they don’t provide you how to remove or uninstall the extensions. I will share this with you today. When the … Read More

(TM47) 90 days reporting for Thai Retirement Visa – Online

(last update on 9 Jan 2019) For Thai Retirement Visa, you must report every 90 days. It is time consuming if you have to report in person. Luckily, you have a choice that let you do online.   Follow the link below. You must use Internet Explorer to access this website. Chrome and Firefox do NOT work. 90 days reporting online   It will take around 24 hours for me and you should get the ACCEPTED email from the website. … Read More

How to add the pagination dropdown list in GridView in Yii2

Earlier, I wrote how to add the summary footer in the gridview widget. The grand total column will sum all the total columns on each page and the default page size of gridview is 20 items per page. I want to be able to change the page size as I want in order to see the new grand total if I choose the search filter. Below is the screenshot that I did. We will add the extra code in two … Read More

How to add the summary in the Gridview footer in Yii2

Currently, I am building the invoice feature in my own application with Yii2. I use the gridview widget for displaying all invoices data. I want to add the grand total for all invoices. Just like the screenshot below. To do that, I have to add the extra code in two places. Note that, I generate the CRUD from Gii. So I will show only the code that I add for displaying the grand total at the gridview footer. First place, … Read More

Building WordPress Plugins with Object-Oriented Concept

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 validate a form with jQuery validation plugin

When you want to do the form validation you can do from the client-side and server-side. I like to do on the client-side so users can get the notification message right away after leaving the input field. The form validation on the client site is very useful when your form contains a lot of fields. On jquery plugin that I often use, it is jquery validation. It is easy to use and I can add my custom method, custom message, … Read More

How to avoid jquery conflicts in WordPress

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

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

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

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

Translating WordPress Plugins

A few days ago, I wrote how to add the translation files to your child theme. If you use the theme which doesn’t come with the translation files for your language, you should check this post. Today I gonna talk about how to add the translation files to your plugin. There is one different thing from the theme translation files which is the translation file name. Okay, let do this. Where the translation files will be stored We will create … Read More

Adding Translation Files To Your Child Theme

Last week, I received the urgent project from my client. The site needed to be online within one day. The client requested only two pages which were the front page and contact page. Also, I needed to add all content and design the template as well as the color theme for them. Finally, the site has only one language which is Thai.  This translation method in this post can apply to any languages. Note I decide to use the Virtue Free … Read More

Checklist for Thai Retirement Extension

For a Thai retirement visa, a person who holds this kind of visa must report at the immigration every 3 months. You can report 15 days before the due date or 7 days after the due date. If you miss your report, the fine is 2,000 baht. Also, you should go to the immigration before opening in order to get your queue. There is a limit of queues each day. Regarding the information that I get from the immigration officer, here … Read More

How to send an email using SMTP in localhost with WAMP

When I develop the email function on my localhost, I like to set the Gmail account for sending an email from my localhost. It is convenient and easy to set up. Today, I will share how to set up the Gmail account to send an email from your WAMP server.  Note, this method works for Windows only.  Okay, let’s do it… Download Sendmail.exe is a simple windows console application that emulates sendmail’s “-t” option to deliver emails piped via stdin. It … Read More

How to make your WAMP runs faster in Windows10

I have been using WAMP for years. Sometimes I notice the web page loads slower than the same web page on the internet. So I did research on the internet and found out for my case, I just need to set the Power Options in Control panel to high performance. You can try this solution for both Windows.   Just small fix but makes things different.

My Favorite Visual Studio Code Extensions

I have been using the visual studio code since 2016. The cool features that I like the most is the outline code and Emmet. It is very useful when I develop the complex application or large website. Other extensions that I often use, are below. @ update on 3 May 2019 Mainly I work on PHP, SASS, LESS, javascript, CSS and HTML. Reactjs and Vuejs are fun to work with as well. What is your favorite extensions?

How to change the default drop-down box on iPhone

When you are working on the responsive design. You want your design works well across all devices. Today I will share how to change the default dropdown box on the iPhone. HTML CSS And that’s it. tip:My sample above, the drop-down box will have the arrow up and down which is in the background attribute. You can use your image and change it to base64 by

Redirect the old URL to new URL in WordPress

It is common that your clients want to change the slugs for the different reasons. When the slug of the page changes, the old URL will return 404 error. Normally, we will redirect the old URL to the new URL for the SEO reason. There are a few ways that you can do the redirect, for example, add the redirect command in .htaccess, using the wp_redirect function from Wordpress or the simple way which is using the new page redirect template. In this … Read More

Remote Debugging On Android Devices From Windows

Sometimes, you have a style issue that occurs on the real mobile device only. If you were developing the site on the PC, it is easy to use the inspection tool that comes with the browsers. But for the real phone, the easy way to do the inspection is using the remote device feature from Chrome. I will share what I do here.   What you will need. Phone with Android operation – Android version 4.0 (Ice Cream Sandwich) or … Read More

Add a MailChimp Signup Form to Your Website

A few days ago, I got a request to add the signup form from MailChimp to the WordPress site. There are four fields in the form which are first name, last name, phone number, and email. All fields are required. Phone number and email must validate. After submitting the form, we will show the success message on the same page. The submit form will process by Ajax. let’s do this.   MailChimp register and login Register and Login First, we … Read More

How to add the links inside the select box

We all know that we can not add the links inside the <option> in the select box. Today I gonna share one simple trick with pure javascript.   Let’s say you want to add the links inside the <option> like this. <select class=”menus”> <option value=”Home”><a href=”home.php”>Home</a></option> <option value=”About”><a href=”about.php”>About</a></option> <option value=”Contact”><a href=”contact.php”>Contact</a></option> </select> Of cause, it is not working.   Here is the correct one with the javascript. <select class=”menus” onchange=”location = this.value;”> <option value=”Home.php”>Home</option> <option value=”About.php”>About</option> <option value=”Contact.php”>Contact</option> </select> … Read More

How to increase the maximum file upload size in Multisite WordPress Network with WHM

Today I have a request from the client to increase the maximum upload file size for WordPress Network. The server is WHM(WebHost Manager). I gonna share with you how to increase step by step. Let’s start.   Media Library in WordPress single site The screenshot shows where we will set in this post.   WHM What is WHM? WHM stands for WebHost Manager. WHM provides administrative control over your dedicated server or VPS. You can manage the server and host your … Read More

How to trigger a click on a link using jQuery

Today I am working on some small tasks. It should not take long. But I stuck on one issue for a while. Here is what I am trying to do.   I have the page link list that is generated by the pagination_link from WordPress. The code looks like this. $big = 999999999; $url = str_replace($big, ‘%#%’, html_entity_decode(get_pagenum_link($big))); $pagination_dropdown_args = array( ‘base’ => $url, ‘format’ => ‘?paged=%#%’, ‘total’ => $total_pages, ‘current’ => $paged, ‘show_all’ => true, ‘end_size’ => 1, ‘mid_size’ => … Read More

Thai Retirement Visa

Today my husband went to apply for the Thai retirement visa at Chiang Mai immigration office at Promenada. The office opened at 8.30 am but we saw many people get in the line when we arrived. We got the latest queue today. The officer told us to come back again at 3 pm. We came back to the immigration office at 2 pm and waited there until they called our number. The process is simple. The officer checked all documents, … Read More

I can not access to WP dashboard after migration

Today I am working on one WordPress project. The site is very simple. No extreme plugins are on the site. What I did, I just migrate the database (using WP Migrate DB plugin) and transfer all WP files to my computer. Then I just edit the database login in wp-config.php. After that, go to site URL. Yeap, everything is working perfectly. Then I go to login URL ( and enter the WP login. I expect to see the WP dashboard … Read More

Multiple grids on one page in Yii2

Recently I upgrade my Yii2 application. What I do, I add two Gridview widgets on one page. One Gridview shows the pagination under the data table which is a default from Gridview. Another Gridview shows the pagination, column sortable and filters on each column. These three functions also are the default functionalities from Gridview. After the changes, everything seems working fine until I notice the pagination of two Gridview widgets won’t work properly. Pagination issue Every time I click on … Read More

TM30 – report to immigration within 24 hours

Lately, if you are the house or condo owner and you have the foreigners stay in your properties, you must report the immigration within 24 hours. If not, you will be fine 1,600 baht. Here is the document you need. a copy of the foreigner passport a copy of arrival card a copy of a visa a copy of your ID card a copy of your house register book a TM30 form (You can download from the immigration website or … Read More

How to get Thai motorcycle driver’s license in Chiang Mai

In Chiang Mai, the best way to get around in the city is using the motorcycle. If you have NON-O visa (NON-Immigrate visa), you can apply for the driver license.   Here is the document you need for apply Passport Copy of your passport Copy of your arrival card Copy of your NON-O via Resident certificate or work permit 2 photos (4 x 6 cm size) with white background Medical Certificate (You can get from any polyclinic. You must tell the … Read More

WordPress VS Modx

Before you read this post, I want to say the post is my opinion. Some people may think differently from me.   I started to use Modx in 2009. It was fast learning and developing. You can transfer the HTML template into Modx easily. You should know PHP for writing the snippet. You should know HTML and CSS for writing chuck. To make the multilingual website, simply to install the add-on and do some configuration. And it is done.   … Read More

How to get a residence certificate in Chiang Mai

My husband is a foreigner and he wants to get a motorcycle driver license in Chiang Mai. Before he applies for a driver’s license he needs to get a residence certificate first. Since we rent a condo, the landlord must inform the immigration if there are any foreigners staying in their properties. The landlord must fill in the TM30 form (download form available on the immigration website) and go to the immigration at Promenada shopping mall on the second floor. The office … Read More

SASS, CSS framework and Task runners

Many years ago, I worked with a web designer. What she did, she designed and created the templates for the web applications and gave to the developers to integrate into the web application. At that time, I never used CSS frameworks or any pre-processor compiler before. I just used the templates and stylesheet that she created.   But there were many times that I needed to adjust the color, padding and so on in the templates in order to fit … Read More

Upload file won’t send to backend with Ajax

Sometimes you create a form by containing the file input field(such as upload image file) and other text input fields. And you want to send all form data to the backend using Ajax. But you find out the only the file input data won’t send to the backend. Why? You may send the form data using serialize(). This is the cause that your backend won’t get the file input data via Ajax. Here is the code snippet using serialize(). $(“body”).on(“beforeSubmit”, … Read More

Global search box in grid view widget in Yii2

One feature that the users like, is the global search. With CRUD from gii module, the index.php comes with filters for each column in grid view. The attribute calls filterModel. It is good and it is working perfectly. But it would be better if users can search for anything from one search box. In this post, we will implement the global search box for Currency index page. What we will do CurrencySearch.php (in models folder) Add new $globalSearch variable Set … Read More

Ajax validation in Yii2

Yii version  When you are working on a form validation, sometimes it is better for the users if you do the Ajax validation on a form. This way, users will get the warning message after they fill in each field. Here is an example. We have a branch table. We want a branch name to be unique. What we will do: Model – In a branch model, we set the branch name in a unique rule. View – In … Read More

VScode and XDebug

Visual Studio Code version 1.19.3 Recently I change my developing tool from NetBeans to VScode(Visual Studio Code). The main reason is, VScode is faster. Plus I can integrate the XDebug extension to VScode easily. Here I will share with you how easy to set XDebug in VScode. Create a test.php in your webroot and add phpinfo();  command into the test.php Go to your browser (Chrome, Firefox, IE, Safari, etc) then type http://localhost/test.php. After that, copies all text on a screen and … Read More

Override delete confirm dialog in Yii2

Yii version In the grid view widget, the delete button uses the window confirm dialog which is simple. But it would be better if it can be changed to use the confirm dialog with bootstrap style. Since Yii2 is already integrated with the bootstrap widget. In this tutorial, I will share how I implement the new confirm dialog with a translated message by Yii::t().   Here what we will do Download the bootboxjs which is a small javascript library. It allows you … Read More

Language switcher in Yii2

Yii version Currently, I am building the custom application with Yii2. I want to add the language switcher in the application. I found some posts that help but these posts won’t explain well. So I try to explain what I did here. Here what we will do: create the static value in config/params.php create a language dropdown list in layout/main.php create a actionLanguage() in the controller create a LanguageSelector component create a JS file for calling the actionLanguage() via … Read More

All javascript won’t work after Pjax reloads in Yii2

Yii version When you work with Pjax either Pjax jquery or Pjax module, you may face the same issue as me. I am working on the Pjax widget in Yii2.0. The widget uses Pjax jquery. ProblemEvery time the Pjax reloads, all js that attached to DOM in Pjax container won’t work. CauseAfter Pjax finishes reloading, the js that set to DOM in Pjax container will not pick up on these changes. SolutionYou must reinitialize the js to DOM after … Read More

Select2 plugin does not function properly in bootstrap modal

Yii version Select2 plugin is very useful plugin when you are building the custom application or website. ProblemWhen I use the select2 inside a bootstrap modal. I can not type anything in the input field that attaches to the plugin. CauseThis issue occurs because the Bootstrap modal tends to steal focus from other elements outside of the modal. Since by default, Select2 attaches the dropdown menu to the <body> element, it is considered “outside of the modal”. SolutionAttach the dropdown to … Read More

Pjax is not working, reloads the whole page

Yii version Recently I am working on building the custom application with Yii2.0. I have one issue with Pjax widget. It turns out to be a common issue when you are working on Pjax. ProblemI want to render the creating form in the modal on an index page. After users submit the form, the modal will be closed and the grid view will be refreshed. This way, users won’t leave the index page. The problem is Pjax reloads the whole page … Read More