Author: David

I'm David, web designer/developer specializing in building functional websites using WordPress. I have strong skills in theme development using Hybrid Core framework and plugin development. It's okay if you want to hire me.

How To Full Backup Windows 10

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.

windows-10-full-image-backup

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.

Read More How To Full Backup Windows 10

WP Page Builder From Scratch #3: Data Structure and Saving Page Builder Data

This is Part #3 of Custom Page Builder Tutorials Series. Read the intro here.

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.

page-builder-ss-order

Download example plugin to follow tutorial easier:

Read More WP Page Builder From Scratch #3: Data Structure and Saving Page Builder Data

WP Page Builder From Scratch #1: Create Page Builder Page Template

page-builder-setting-selected

This is Part #1 of Custom Page Builder Tutorials Series.
Read the intro here.

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:

Read More WP Page Builder From Scratch #1: Create Page Builder Page Template

Create Your Own WordPress Page Builder Plugin From Scratch

doge-meme-page-builder

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:

Read More Create Your Own WordPress Page Builder Plugin From Scratch

How to Add Ads after Read More Tag in WordPress

ads-after-more-tag

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:

Read More How to Add Ads after Read More Tag in WordPress

How to Add WordPress CPT Admin Menu as Sub Menu

cpt-menu-as-submenu
f(x) Photo Tag Admin Page

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:

Read More How to Add WordPress CPT Admin Menu as Sub Menu

My Contact Form 7 Tips & Hack

cf7-banner

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.

Read More My Contact Form 7 Tips & Hack

How to update get_currentuserinfo() for WordPress 4.5+

In one of my plugin, f(x) Profile Dashboard Widget, I use get_currentuserinfo() to get current user data, apparently it’s deprecated in WP 4.5.

Here’s the code I use to replace it with wp_get_current_user(): while maintaining backward compatibility.

Previous Code:

global $current_user;
get_currentuserinfo();

New Code (WP 4.5):

if( function_exists( 'wp_get_current_user' ) ){
    $current_user = wp_get_current_user();
}
else{
    global $current_user;
    get_currentuserinfo();
}