Set options on activation Themes

The Photo Blog Theme Greyfoto has been updated and I wanted to make sure that the settings of WordPress are as I need them for the theme. Therefore must be written some data in the database when activate. Currently there is no hook for this, as is known for Plugins. The discussion on WP-Hacker-List was just right on time, and possibly Theme Developers get these hooks, similar to Plugins in WordPress 2.9.

If you want to use the activation of the theme in order to set various settings, then the following snippet can be very useful, which came up in the discussion on the WP-Hacker-List. This works like a charm and should be useful for theme developers who want to enable the options upon activation.
Continue reading …

WordPress Basis Theme – Also In HTML5

Since I deal with WordPress (version 0.71), I have my own theme layout created, which I always use to start with a new theme - WP Basis.
I published this theme under GPL since then and it is quite popular. I have continued the development on the theme and it has grown with every version of WordPress up to 2.8.2. To better handle these changes, I put the theme in the SVN of Google Code and were able to profit of the cooperation of Andreas and Dominik - many thanks to them!

The theme is also backward compatible, tested up to version 1.5 of WordPress.

Download the theme here

FYI, the theme is not a Framework, it is a simple theme, which contains the foundation of a theme only and also a variety of little features from my experience with WordPress. It really means that you have a theme for your clients or yourself created, adapted to the requirements. It doesn't contain any unnecessary markup, as you have with most Frameworks. It will remain as it is now, no Child-Themes or something similar, no hooks for comfortable implementing of code. I like this kind of work, lean and fast, direct to the point. That's why I'm not a big fan of Frameworks in WordPress, but that does not mean that other developers should do the same!

If you like this kind of work and you always write your own theme, then Basis Theme might be something for you. By the management in the SVN you are also have the opportunity to report errors and issues. It would be great if you could help to make this theme even better.

The future

I began to build the Basic Theme in HTML5, so that WordPress can work with it. I also added an example stylesheet, so there is a design available.

In addition, there is a small stylesheet, which displays the new fields and their tags, a good start in HTML5 to have it more visual. The stylesheet is not included in the code but can be added via the web developer toolbar. You can find the stylesheet in the structure under layout/html5areas/html5areas.css. A post with this stylesheet looks like that:

html5areas

Several parts are currently only in Opera > 9.5 visible. These include all the contents of the comment form.

form-opera

Work with ...

As a reference I use the summary of w3c and the blog about HTML5. Unfortunately, validating is not so easy, because I don't know any validator which can validate locally. If you know one, please let me know. For IE, I added a script, which teaches IE to deal with various elements.

Why all this?

It would be great if one or another can look at it, maybe people who have a profound knowledge of HTML5. Feedback would be great and perhaps one or other might expand the theme with specific tags or elements.

How do I get it?

There is no download link and as of now there are only a few guidelines but it should become the same as WP Base Theme. To become acquainted with the theme or just look over it, you can check it out in the repository. There you are able to comment and discuss.

The folder with all contents can be found in trunk/basis-html5 of the SVN.

Related Posts on Category

It's not easy to keep your readers on your website. It's a challenge to provide new readers valid information, even though they were written a while ago but still up to date. A good idea is to provide posts from the same category as the post, the reader is reading currently. You can create a little function, which is listing related posts based on the category ID.
Continue reading …

Disable WordPress Search

Not always is the search in WordPress desired. The one or another application with WordPress doesn't need this feature. Even if it is an added value in my opinion. In some cases, it still shouldn't be displayed and so I have them deactivated with access to two hooks. For now, I can see no other place where you could access it in my applications and it works so smoothly.
Continue reading …