wp theme zh2

Theme used for this site – ZH2
Creator – Leo Babauta
More about – Minimalism
Notes – To learn more about the theme


Its free to use – You may download here
Or An Updated & Enhanced Remake – zh2plus
Install guide – Read this before you install and customize.

Using a minimalist theme

I usually design my own theme. But this time round, I need to use somebody else’s design. When you tear down too much, it may collapse. So it’s safer to use a design that the creator is using it currently.
There’s a slight difference – This site is built with multiple sites enabled. Not sure if everything works as in a single site.
I need to disable the JetPack as it interferes with mobile viewing.
I cannot spend too much time on the look and feel. I got to quickly get over it and move on to the next project.

How to Sync WordPress and Facebook: 14 Steps

If you have a WordPress site, and you keep your blog updated, you probably want to spread the word through the Internet. A good place to start is Facebook. You can actually sync your WordPress and Facebook accounts so that, every time you post an article on your WordPress site, a link is automatically shared on Facebook.
Using Jetpack to Link your Facebook Account
If you have a WordPress.com site, you have Jetpack installed. If you have a self-hosted WordPress site, you can easily install Jetpack by creating a WordPress.com account and then syncing your self-hosted site to WordPress.com. In either case, Jetpack can be found or activated by clicking on Jetpack on the menu on the upper-left side of your WordPress dashboard page.

Source: How to Sync WordPress and Facebook: 14 Steps

Get Indexed By Google In 5 days

The fist page created for this site
My first HomePage

I am no Search Engine Optimization guru, nor am I a SEO expert. I am just a webmaster. But this is how I got my newly-registered domain listed with Google in 5 days with just a home page and no other content pages whatsoever.
Do just one web page and upload it to your server.
Your other pages may take days or weeks to complete, depending on how fast you could get it done. No hurry. Take your time. The idea here is to get your site indexed with just a page.You don’t have to complete the rest of the pages to get indexed by Google and Bing.
Once your site is indexed, the rest is easier.
These are the only 3 files you need to prepare:

  1. index.html or index.php – the home page
  2. robots.txt
  3. sitemap.xml

Upload them to your server immediately.
If you have an existing site, provide a link from that site. This is the secret of getting your site indexed. If you wait for the search engines to discover your new site, it’s going to take some time. You could submit your site to notify them of your new site, but I don’t like the idea. I rather submit through the Google Webmaster Tools.
Surely you have an existing site, like one with WordPress.com or Blogger. Just insert your link in your new post, like I now blog at NSK.sg – effective webmaster guide for site owners or this site has moved to NSK.sg – webmastering 101 tips for site owners
What if you don’t? Read till the bottom of this page.
Wait for a few days.
I didn’t check every day. On the fifth day, when I keyed my domain on Google search. It appeared.
Now, the speed of having it indexed depends on how quickly the Googlebot visit your existing site.
It showed up in Bing a few days later. I didn’t keep track so I couldn’t remember how many days later.
Earlier, I mentioned using Google Webmaster Tools. Let do it at the same time.

Submission throught Google Webmaster Tools

Log into your Google’s Webmaster Tools to submit your sitemap.xml and robots.txt.
If you do not already have an account, sign up with your Gmail account.
You must have have Google’s Webmaster Tools if you want to monitor the progress of your website. Get it while it’s free.
Inside the Google Webmasters Tools, when you add your site, Google will need you to upload a verification file to your server for proof of ownership.
Copy the file provided by Google and upload it to your server.
After successful verification, submit your robots.txt and sitemap.xml.

What’s in your index page?

You can put in just your domain name, but that’s not very helpful. My domain is NSK.sg. It doesn’t say much about what it is and what it does. It will still get indexed, but that’s not what I want.

What’s your USP?

My site is about :
Helping site owners to be the webmasters of their website.
A showcase of how I build websites on subdomains with WordPress and Static Pages.
Most importantly – the local search strategy
I am not a fast writer. It will surely take some time to have the above phrased nicely and orderly. So I just scribbled “Webmastering Tips For Site Owner, Coming Soon” and have it uploaded immediately.
Over the course of the next few days, I made several changes, even after it was indexed.
Homepage 2 and 3
Will your site get indexed by Google in 5 days? It’s all about timing. You may get indexed in 3 days. If you are lucky, the moment you provide the link or submit your site through Google Webmaster Tools, the robots arrived. Or it make one a month later. This is something beyond our control. But whatever the case, do it fast. Don’t waste time searching for the perfect image or editing the HTML.
Just do in 15mins and upload immediately. You can do the editing later.
If you looked at my screenshots provided, you’ll noticed I made several changes over the courses of a few days. The preview link wasn’t present in my first homepage. It was provided after I did installed WordPress and it was linked to the default first post – Hello World.
Homepage 4

Samples for robots.txt and sitemap.xml

Open your notepad, copy and paste the text below, and save it as robots.txt .

User-agent: *
Allow: /

Now, open another new file and save the following as sitemap.xml

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">

Remember to change the domain name to yours.
That’s all you need to do. Now wait, they will come.

Moving WordPress at Subdomain to DocumentRoot

After switching from being an addon domain to the main domain, the moving of files were rather smooth-going. Most of the WordPress continues to work. However, there’s one issue that borders me.
Whenever I upload a graphic file, WordPress would create a new folder under the root directory – wp-content/uploads/YYYY/MM/imagefiles.png.
That was not what it should have been. I had move the subdomain to a new DocumentRoot, so the uploading of graphics should be inside the new DocumentRoot and not create a new directory under the root directory.
Though the upload was successful, the files were added to but not showing up in Media Library.
As expected, nothing shows up when I try to insert the image file into a post.
I was rather puzzled. Days of searching for a fix produced no results.
No forum could supply the answer. But from what I gathered, the problem lies with the .htaccess. It may just requires a slight modification, but I do not know how to.
I need a working sample to copy from, I can’t write one myself. The .htaccess is one file I dare not meddle with unless I know exactly what I’m doing.
Further search for “change path media upoad of wp in subdomain” point me to these files:

  • wordpress.org/support/topic/how-to-change-the-default-media-upload-location
  • www.wpbeginner.com/wp-tutorials/how-to-change-the-default-media-upload-location-in-wordpress-3-5/
    Close, but not exactly what I was searching for. I wanted the default setting, not help on change to default setting:
    It was a search phrase like this “WordPress at subdomain moved to documentroot now upload cannot work” that I got me into this arcticle:
    When I read to Step 5, it says,

    Select “Settings,” “Media” and then change the URL in “Store uploads in this folder” to represent your new URL.

    That’s it. I didn’t know there’s a setting for media in the Admin area.
    I’ve never seriouly explore this area as different version of WordPress installation shows up differently though they’re updated to the current version.
    In the past, I have never depend on this mode of media uploading. I had always upload image files to my manually created images folder and code the path in my post.
    This is the first time I am using the drag-and-drop mode to upload images.
    Anyway, in the Setting – Media – Uploading files of the Admin Area, I found 2 blank boxes waiting to be filled:

    1. Store uploads in this folder
    2. Full URL path to files

    I filled in the absolute path including the document root and did another upload. Now it works.

Structured Data Markup

This is my first attempt on Google’s Structured Data Markup found inside Google Webmaster Tools under Data Highlighter of Search Appearance.
Structured Data Markup by Google Webmaster Tools. (Requires sign-in with your Gmail account)
The target page needed for the Structured Display is at:
It would be clearer to the public if the info is displayed as:

NameOfClub	     Address		Date  	 Price 

Now Google tries to be helpful

When the page was loaded inside Google Webmaster Tools, I realised I need to make a change with the template. The default with sidebar was not what I wanted. It should be the one display full-page-width without the sidebar.

Previous page shown despite several updates and hours later
Old page shown in Webmasters Tools

The template was corrected, but Google continues to show the old page. There is no option for me to reload or tell Google that the WP page has been revised.
After going ahead with the highlighting, I clicked for it to be published, though Google shows numerous errors; mostly on the date format.
The 2 Events Saved in Webmaster Toos
Data Highlighter Inside Webmaster Tools

Playing with Schema

I now have a brief idea of how the data should be coded for Google to understand it. I went in again to the blog to add data to the page.
I’ve read about this before but have never seriously thought about implementing to any of my pages. Now is the best opportunity to apply it and see the outcome of the search result, should it ever get accepted by Google.
http://schema.org/ provides the help, but I don’t think I understood everything I read.
Let me copy from an example and see how it works out. The page I am doing is a promotion for Singapore’s first ever island wide speechcraft workshop. Should I mark it under LocalBusiness or Event? Let me try Event. I’ll come back to change it to Local Business if this is not right.

The Codes

<div itemscope itemtype=”http://schema.org/Event”>
<dt itemprop=”name”>Club Name</dt>
<dd itemprop=”location”>Club Address</dd>
<dd> <meta itemprop=”startDate” content=”2013-09-03″/>3, <meta itemprop=”startDate” content=”2013-09-10″/>10, <meta itemprop=”startDate” content=”2013-09-17″/>17, <meta itemprop=”startDate” content=”2013-09-24″/>24 September 2013, 7pm-10pm </dd>

Not sure if this new coding is helpful to Google Webmaster Tools. Few hours later, it continues to show the old page with the side bar.
As Google is unable to present the new coded page, the most I can do is let Google publish the old page.
When the new page shows up in the Webmaster Tools then would I be able to do the Structured Data Markup onto the new page.
If the data gets displayed correctly, the next site to do is Lego Serious Play Singapore.

Other references on Structured Data

Fatal error Call to undefined function twentytwelve_content_nav()

I was adding an item into the custom menu when this happened. Prior to this, I had just uploaded a page template from my machine’s localhost. Everything was working fine.
So what exactly causes this fatal error, I really have no idea.
The child theme stopped working and TwentyTwelve took over to become the default theme.
In the admin area, this is what the theme looked like. It didn’t appear normal. The name, the description and other text within the remark looked unwrapped.

WP Theme Selection Area

The Fix

These are some of the attempts made:

  • Re-upload the child theme
  • Re-upload twenty twelve
  • Switch FTP transfer mode from auto to ascii and repeat the above.
  • Remove all other files except the style.css
  • Remove index.php
  • Renaming the child theme
  • Upload function.php to the childtheme folder – it calls for another file in twentytwelve

Nothing worked.

This could have been a solution

I was contemplating on renaming TwentyTwelve to something else and add the styling of the child-theme to the main style.css.
But I would have to rename all occurrence of “twentytwelve” in the templates in new theme folder to a new name or else some of the template will run into error.
That looks like too much work.
So, before jumping into it, let me fix the style.css one more time.

And Finally…

I deleted everything in the style.css except those that commented for the theme; That is, delete everything except those from /* to */
As usual it still looks normal in localhost but not when uploaded to the server.
I opened up a new text file and retype everything from /* to */, uploaded, and Bingo!
This looks normal now…
That means the cause of the error comes from those text in the commented area.
It doesn’t make much sense to me. What works in localhost doesn’t worked at the server.
And the cause is the text in the commented area.

Recap for the Fix

Redo the style.css of the child theme from scrap. Do not copy and paste. Or if you must copy to avoid typo, do not copy from the file that gave the error. Copy from twentytwelve and make changes.
If you ever encounter this same problem. Fix the style.css first.
Of course, what works for me may not worked for you. It may be the same error but caused by a different source. I am no PHP expert and I do not understand the WordPress engine.
Total time spent – 4 hours. If you engaged me to fix the error, and if I were to charge $50 an hour, that would have costed you $200.
Learn to be your own webmaster.

A Homepage and Index Page for WordPress

Home Page V3 For NSK
Another Temporary Home Page for NSK

I want to have a home page, and at the same time, I want the index page to continue showing a list of postings.
Setting the front page provided by TwentyTwelve will not work, as with any theme with WordPress. It will bypass the index and call the single.php instead, showing only the single post.
I created a home page and named it index.html, so that it will not overwrite the default inde page.
It works but, unfortunately, it clashes with the showing of the multisites. only those built with standalone WordPress would work. Multisites’ links lead to the index.html instead.

My Workaround

Renamed the home page as homepage.php and upload to the root directory, not the directory that contains the theme.
The actual home is still index.php with 10 postings, but the usual link to home (site title) is linked to the homepage.php instead.
Not exactly what I wanted, but I have a home page, and an index page.
This is home page version 3. Will leave it as it is now, and come back to do a version 4 when the time comes.

Workaround #2

Since this is built with multisite, I could have set up a blog on another subdomain and named it something like webmaster.nsk.sg. Now I can have a home page at the root directory, website at webmastering.nsk.sg, and blog at webmaster.nsk.sg.