By month: September 2014

How to develop WordPress plugin: Initialise (step 2 of 5)

Plugin file structure

First create the following folders and files.

nopkinwp-hello.php – the main plugin file

This is the main file to define and initialise the plugin. It can be given any name but it is a good practice to give it the same name as your plugin name.

This file defines the plugin giving its name and description, author, version, license information, etc.

Now if you look at WordPress Plugins page, the information you entered above within comments is displayed here.

Next, these are functions to include other required files.

Mysql table
As the main purpose of the plugin is to display “Hello world…” text from mysql table, a mysql table has to be created and text inserted.

The plugin’s main function
Then there is the plugin’s main function, which will be used as shortcode and function call to display “Hello world…”

How to develop WordPress plugin: Introduction (step 1 of 5)

What will the plugin do

This is an example WordPress plugin which will, on installing, a simple mysql table will be created with “Hello world” text. This text can then be displayed on the site via Widget, shortcode or direct function call on a template file. The plugin has all the necessary components like Widget, shortcode, function call, settings page, etc and can be used as a start up to develop more complex plugins.

The plugin is called “Nopkin WP plugin”.

To get the idea of what we will accomplish with this plugin, take a look at the following screenshots:

Wordpress Plugins page

WordPress Plugins page

Setting link

Setting link

Options/Setting page

Options/Setting page







How to use Dzongkha font on Website

dzongkhaWhile developing my pet project Bhutanese Calendar (WordPress Plugin for Bhutanese Calendar available here) I had to look for a nice Dzongkha font, convert it into web-font and use on the site. I came across a good number of Dzongkha fonts available on various websites like Dzongkha Development Commission and DIT. These are few popular ones:

  • Uchen
  • Wangdi (Joyig)
  • Jomolhari

This is Uchen font: དཔལ་ལྡན་འབྲུག་པ་ཕྱོགས་ལས་རྣམ་རྒྱལ།་ ༡༢༣༤༥༦༧༨༩༠

I have found that the size of most of these Dzongkha font files are too big (more than 1G) to be converted to web fonts, especially the ones downloaded from DIT website. Using big font files unnecessarily adds to load time of the website, which is of course very bad in all respect.

Dzongkha Development Commission and BBS Dzongkha use Uchen and Jomolhari respectively and when I gave a quick test on the size of font files is simply appalling, adding significant load time to the websites.

DDC Website

DDC Website

BBS Dzongkha

BBS Dzongkha website

For Bhutanese Calendar, I have used a smaller size Uchen font, which converts to just 32K web-font. If you want to use it click the download link below.

Uchen web font used on Bhutanese Calendar website

Uchen web font used on Bhutanese Calendar website

Download Uchen web font here

Download Dzongkha fonts (Uchen, Tashi, Wangdi, Jomolhari)

CSS not working on IE11

IE_bugIf you find your CSS is not getting rendered as expected and the website looks strange on Internet Explorer 11, just add this within <head>…</head>:

My Babies wishing me Happy Father’s Day : )

Cute is the word….


About me

profileSangay Tenzin
Web Developer, Magento, Concrete5, Wordpress, Shopify, Ecommerce, Website all-rounder, Casual blogger…

Love… Happiness…



Bhutanese Calendar
གནམ་ལོ་ ས་ཕོ་ཁྱི་ལོ།

Earth Male Dog Year 2019

འབྲུག་ཟླ་ བཅུ་གཅིག་པ - བཅུ་གཉིས་པ།

January 2019

ཟླ་བ Sun
མིག་དམར Mon
ལྷག་པ Tue
ཕུར་བུ Wed
པ་སངས Thu
སྤེན་པ Fri
ཉི་མ Sat
༢༦ 1
༢༧ 2
༢༨ 3
༢༩ 4
༣༠ 5
༡༠ 16
༡༡ 17
༡༢ 18
༡༣ 19
༡༤ 20
༡༥ 21
༡༦ 22
༡༨ 23
༡༩ 24
༢༠ 25
༢༡ 26
༢༢ 27
༢༣ 28
༢༤ 29
༢༥ 30
༢༦ 31

Powered by Bhutanese Calendar