Recent posts in WangenWeb

Creating WordPress Child Themes

A Child Theme in WordPress is simply a “style only” Theme, and is easily made by adding Template: themefolder to your style’s header.

The basics of creating a Child Theme

If you want to create a Child Theme to Basic2Col your style.css header will turn out:

/*
Theme Name: My theme
Theme URI: http://mysite.tld/
Description: My Basic2col Child Theme
Version: 1.0
Author: Me
Author URI: http://mysite.tld/
Tags: Child Theme
Template: basic2col
*/

As you see the last line says: Template: basic2col. This will tell WordPress that your theme will use Basic2Col’s template files instead of having their own.

Other files you can add (by default) to your Child Theme is functions.php and screenshot.jpg/png/gif.

If you want to add other template files to a Child Theme and make them override the template files of the Parent Theme, you need to have the WordPreciousss plugin installed on your site.
Creating WordPress Child Themes continued

New free blog hosting service: MiniBlog It!

MiniBlog ScreenShot I’ve set up a new free blog hosting service called MiniBlog It!.

What MiniBlog It! has to offer is free mini blogs, which is suitable for everyone who wants more writing options than Twitter, but less than a real blog.

The site uses a heavily hacked version of the Prologue Theme, and I’ve created several colour schemas, added in some plugins, made the write post form’s textarea a little bigger to make it work as I wanted.

I’ve also made it possible to post to Twitter if you use that service, using Alex King’s Twitter Tools plugin - but you need to activate it to make use of it.

Anyway, if you want a free MiniBlog to post random ideas, doings and messages, you can get one at MiniBlog It!

My own MiniBlog is here if you’d like to take a look at it ;-)

Custom page- and single templates in WordPreciousss

(I know I wrote yesterday I’ll take a blogging break but I got an email on this topic, so I think it’s better to write a post about it).

Custom page templates

In WordPreciousss 3.0 you can have global custom page templates, but to make use of them there’s two things you need to do.

  1. Custom page templates need to have the file name page-name.php
  2. To use the custom page template on a page you need to use the custom fields:
    key = page_template, value = name (name is the same a page-name.php)

In the default package of WordPreciousss you’ll find three custom page templates in the directory /templates/myown/:

  • page-links.php - for a link page
  • page-archives.php - for a archive page
  • page-search.php - for a quick search page included with tagcloud and search form

If you copy these to /templates/precious they will apply to all themes on your site. The custom page templates can be overwritten in a theme by creating a file with the same name. And you may create custom page templates that applies to only one theme if you like.
Custom page- and single templates in WordPreciousss continued

Summer break from blogging

I’ve decided to take a summer break from blogging at WangenWeb as I have some other projects that need my attention, and I also want to spend some time to look through the outdated plugins and themes and try to update the most of them.

And last but not least the rest of my familiy will have summer break too, so I’m not sure how much computer time I’ll have.

How long the summer break will last, I’m not sure. But August might be a good time to come back.

Of course you can grab the feed to the site to make sure you don’t miss anything ;-)

I will drop by the forums from time to time, and I’ll try to answer all emails as soon as possible.

WangenWeb Weekly Digest (24/08) - Special Edition: WordPreciousss 3.0 is out

This week’s weekly digest is a special edition as I’m proud to present WordPreciousss 3.0.

Download: wordpreciousss30.zip

I’ve worked on this edition since Marsh this year, and as already mention earlier this week there’s a lot of changes between 2.1.3 and 3.0 as it’s a total rewrite of the plugin.

The most important changes are:

  • Ability to have several global template sets for your themes (a Sandbox edition is coming up)
  • Ability to add normal WordPress theme templates both to the template sets and child themes - Note: custom page templates are loaded by custom keys
  • Ability to create custom single templates
  • Many old template tags has been deprecated in favour of precious_get_file and precious_include_file
  • the old loops templates are moved to /loops but can still be added to the root directory of your theme
  • the template tag precious_comments has been made optional, which means if you want to use WordPreciousss default comments.php template, you can just delete the one that’s found in your theme.

WangenWeb Weekly Digest (24/08) - Special Edition: WordPreciousss 3.0 is out continued

What’s coming in WordPreciousss 3.0

Version 3.0 of WordPreciousss is almost ready and I hope I can launch it by the end of next week.

This is a total rewriting of the plugin and will have support for real WordPress Template Files, which in basic means you can have a global single.php, comments.php or even custom page templates that all themes use unless they have their own.

This is especially good on WPMU sites, where maintaining sometimes hundreds of themes can be rather time consuming.

You can also have several sets of template files, as I’ve moved to definition of “MYOWNPATH/ URL” from the main file to a theme’s function.php file. That way you can pick another set of global template files and use for your theme instead of the default one.

And WordPreciousss 3.0 will also have the option of adding normal template files to child themes. This is actually a feature Ian Stewart at ThemeShaper is trying to get into the WordPress Core.

So with the next generation of WordPreciousss you will have several options and levels of setting up and customize a theme (or hundred if you like) for your site.
What’s coming in WordPreciousss 3.0 continued

New plugin: Fake MU Plugins

Fake MU Plugins is a simple plugin for standalone WordPress that let you test if a normal WO plugin can work as a sitewide plugin on WordPressMU powered sites.

Download Fake MU Plugins

This plugin is useful if you don’t want or can’t install a WordPressMU site somewhere just for testing.

The plugin will let you mimic the behaviour of how plugins work on WPMU site, by letting you upload plugins to a directory called mu-plugins instead of the normal one (plugins). The plugins uploaded to the mu-plugins directory will be run automatic and will be what MU-people call “sitewide plugins”.

So with this plugin you can quick and easy see if your plugin can be used as a sitewide plugin on WPMU.

Now, there are several reasons a plugin won’t work, - and this is the way it works on WPMU, so it’s not a bug in the plugin:

  • Plugins stored in a subdirectory won’t work.
  • Plugins with hardcoded paths will break - eg. if your plugin is looking for a file in “wp-content/plugins/myplugin/” to be able to work, it will break

And you can’t use “Fake MU Plugins” for testing plugins that hooks into MU specific code.

For info on installing etc. see the plugin’s homepage

WangenWeb Weekly Digest (23/08)

The weekly digest is a day late this week as we were away all weekend.

This week at WangenWeb

This week’s Web Treasures

Next week on WangenWeb

I do hope to get a Release Candidate of WordPreciousss 3.0 ready by the end of the week, but I’ll really can’t say for sure.

Building WangenWeb Part 2: Adding general content

This entry is part 2 of 2 in the series Building WangenWeb

After you have made your blog secret and safe, it’s time to add content to it.

The reason for adding content before picking/ creating a theme and adding plugins, is that you don’t know what kind of design that will suit your site, or which plugins you actually will need before you have any real content.
Building WangenWeb Part 2: Adding general content continued

Precious Skinner 2.0 Beta 2

This is really just a small update on Precious Skinner 2.0, but it’s makes sure you can add a comments.php file to your skin(s) without using any template tags.

Download: Precious Skinner 2.0 Beta2

This is still just a beta, and it’s needs some more testing and playing with code.

I’ve also written an info page on the plugin to help you along: Precious Skinner.

On my todo list for the plugin is:

  • Adding support for WordPreciousss 3.0
  • Add an option for automagically create a “skins” directory for you theme
  • Your ideas?