Approach to one-page web in WordPress

One page web design has a little myth: Not dynamic enough. However, it is still possible to be dynamic using WordPress. Recently I found 2 ways to work-around it. 1: Widgetize the content area; 2: Page extract.

1: Widgetize the content are

I think there is no need much explanation on this one. Just create widget for specific area:

Widget

However, widget area doesn’t give you much “Dynamic” impact. The lack of visual editor, the need to use HTML tags and of course uploading an image. It will be a lot of job to start off, though updating is easier. That’s why I discovered another approach, the page extract.

2: Page extract

Time to revisit WP_Query again. Notice that is has pagename=my-page-name ready when query WordPress loop.

<?php
$the_query = new WP_Query('pagename=contact');

while ( $the_query->have_posts() ) : $the_query->the_post();
	echo the_content();
endwhile;

wp_reset_postdata();
?>

There I can query some pages I need on that one page. This can help editing the layout content, I gets all the visual editing, media uploading and etc. Just as per post/page editing. It helps a lot when creating for a client.

On part of the custom menu, it is like normal. I’m using <a name=""></a> approach, so instead of normal drag-and-drop, I go with custom link:
Custom menu

Speed is getting slow

I don’t know why my working speed has been greatly reduced. Years back, it took me just 2 hours top to finish a website, 3 for a WordPress theme. Now… It takes more than 5 hours for just one WordPress theme.

I wander around the house just now and keep thinking why the productivity dropped so much, that I cannot come out with 2 full themes in one day… And I got half of it right.

ClockThe WordPress hooks getting more and more. Back in the day, when it is still 2.9 version, it has only a few files to work on and few hook, the rest, go and look for a plugins. But with all the add-on today, a lot more files to go through and a lot more syntax to take care. When there are hooks ready to be use, I will go and use it, push down all the unecessary resouces for plugins.

I think my right arm is getting weak, clicking and typing is not as fast now too. If you ask me what is the great gifts for men, I will say a great partner, so I can take less burden on work now…

WordPress Premium Theme and Framework

As a WordPress developer, I am in love with all those premium themes and frameworks (both free and premium), the community did just the work we all looking for. After checking out several premium themes and frameworks, I find that:

Basically they are just an ordinary theme

They can be an odinary theme as well, if you want. A few premium themes from ThemeForest doesn’t do that though. Some premium theme tend to make you think and read just to make it works. Most, are just an ordinary theme comes with some function, you either use it or leave it.

Need advance knowledge, or at least some times to understand

I first check out premium theme was from WooThemes. They have all those needed functionality, including adding Sidebar widget. However, it required some knowledge, or time to read through their documentation to understand where and how it works.

Built-in EVERYTHING

Almost all premium themes and frameworks like to build everything in a theme, widgets, shortcodes, header image, background and etc. The thing is, they did not sync with what WordPress already offer. Eventually, you’ll have to keep using their theme to make sure things are still intact, especially shortcodes.

This way or that

The one thing I like checking them out is to see how they solve those problem, differently. Many premium themes has same options, but different way to present it. That is where the “Ah-Hah!” moment, which sometimes help me on my work :P

Well, I did tried to get more premium theme to test, by illegal mean :P But I didn’t do it though. Most premium themes I get are from my clients. Yes, even the basic user having hard time to setup the premium features.

Wrong choices

First, I thought running a VPS is much better than Share Hosting, since I have much more resources to run on, but it ended up not-really result.

RAM monitor

I ended up monitoring almost on daily basic, especially at night, when I have more time to spend on miscellaneous things.

Search around the Google and ask around the support. Then I find out: WordPress is one RAM and CPU hogging system and Apache is not well-written and RAM and CPU hogging too.

I guess how WordPress taking the resources is an open secret, a lot of forum and support can find the support, it will ended up using this plugin and that plugin. Overall, not really coming with good result.

Consider there are a lot more system like Nginx and Lighttpd. Apache is not a good choice, but a widely used one.

Web server

I signed up for a managed VPS, maybe I should consider an unmanaged VPS for my next choice. Yes, there is always a “next” in my list. Believe me, any hosting will go down the hill from time to time, don’t be sturborn and keep on one only.

The good thing: Nowadays most hosting provider provided web transfer services free of chrage when you moved to them. Just let them finish the transfer then only change your domain nameserver will minimized the downtime, or even, no downtime at all.