Sometime we need to save API key, or password, for external services in our WordPress plugin. It’s problematic, since we have to use that key to make API connection, but we don’t want to save it in plain text (because it’s just plain dumb). So we need a way to encrypt this key and save it to database, and decrypt it to use.
Yesterday, I rented a work space. 5x4m , bathroom, AC, for kinda-an-office (I heard that separating work-space and house can improve productivity).
But apparently the wifi signal sucks. It works but sometimes the connection in my laptop stop for no reason. It’s not disconnected, but simply won’t open any webpage like there’s no connection. Updating driver, changing device setting, etc don’t work.
But it works fine on my mobile devices.
So, I try to use my android phone USB tethering feature and apparently it works like a charm. So the phone will get the internet via wifi and transfer it to my laptop via USB. (So, my phone works like an USB Wifi Adapter).
Works well on my old android phone. Nice and simple solution. So, if this happen to you, and you have unused android phone, you can use this method.
Note: I tested this method with Android 4.1.2 (Jelly Bean) / 5.0 (Lollipop) and Windows 10 laptop. No additional driver needed. Just plug and play.
Several days ago, my old secondary laptop (Win 7) suddenly crash. But I did a full backup several months ago. I simply restore it, and everything is up and running again.
Then I remember that I never do full backup on my new laptop (Win 10). Windows 10 have a weird backup system and I’m not familiar with it. So, without further ado, here’s how I do full backup on Windows 10.
You can download / check github repo for example plugin:
And here’s the video of the plugin in action:
In earlier tutorial, I cover all about the page builder design, and how to make all the control works (create, delete, and reorder rows).
In this post I want to explain how I structure the data and save it as custom fields. Specially in how to update the row order number so we can properly save each rows data.
Download example plugin to follow tutorial easier:
In this post I will explain how to create page builder from this:
to this fancy drag-and-drop UI:
To follow this tutorial easier, you can download the source code for this tutorial:
In this post, I will explain:
So, the basic idea is to register “Page Builder” page template, and use it to toggle/switch between Visual Editor and Page Builder when user change the page template.
To follow this tutorial easier, you can download the source code:
This is the introduction of Custom Page Builder Tutorials Series.
Page Builder is very popular in WordPress. This post is not about how to use page builder. In this tutorial, we are going to build page builder plugin from scratch.
It’s not going to be a complex page builder, a simple one so we can understand how the code works, and possibly use it as base/example for more complex system.
This is the page builder in action:
Today, this site finally reaches a new milestone, 500+ page views/day. Even though it’s very low, I decided to add ads in this blog.
This blog uses full content in archive, and I’m breaking long content using manual “read more tag” (not using excerpt).
Note: You can add more tag using the editor toolbar or using
<!--more--> in text editor.
I want to add the Ads in all blog post after read more tag, so technically when visitor click the read more, they will see ads on the top of the page.
It’s tricky because when we use
the_content filter, WordPress already transform
<!--more--> tag into HTML tag, something like
<span id="more-1325"></span>. Here’s the code:
When I write f(x) Photo Tag plugin, I think it’s best to put the menu under “Media” because it’s simpler, and also make sense.
Sometimes we want to add custom post type admin menu as sub-menu item on other post type or under settings page, because it make sense (not all post type need to be parent menu), and I like this approach because it make WordPress Admin cleaner.
And Here’s how I do that:
Contact Form 7 is my preferred contact form in most site, It’s free, light weight, and easy to use. It’s full of awesomeness.
Here are several tips for Contact Form 7 user that I use regularly.