Category Archives: wordpress

TwentyTen: Rotate Your Own Header Images

Today I switched over to the new default template of Wordpress 3: Twenty Ten. I really like it. It’s clean, pretty flexible and very close to the Cutline template which I used before.

Twenty Ten allows you to choose either one of their default header images or you can upload one of your own. I don’t like having a static header image, I prefer seeing a different image with each new page load. Luckily, this can be achieved very easily by installing this plugin by HungryCoder: Twenty Ten Header Rotator. Once installed and activated it will rotate over all default header images plus the custom header image which you eventually uploaded by yourself.

Using Your Own Images

Though the default images are really nice, I would like to display my own images instead. Now, this needs a little bit more handiwork.

First, you need to create a couple of images with a width of 940 pixels and a height of 198 pixels. Now upload these images e.g. to themes/twentyten/images/myheaders.

Next, open functions.php and search for “register_default_headers”. You’ll find an array with all default images. Either add your own images additionally to the default ones or replace the default images. I decided for deleting the default images.

The code should look similar to this:

register_default_headers( array(
	'1' => array(
		'url' => '%s/images/headers/1.JPG',
		'thumbnail_url' => '%s/images/myheaders/1.JPG',
		'description' => __( '1', 'twentyten' )
	),
	'2' => array(
		'url' => '%s/images/headers/2.JPG',
		'thumbnail_url' => '%s/images/myheaders/2.JPG',
		'description' => __( '2', 'twentyten' )
	)
	// add more images here.	
) );

Note, that I’m using the same URL for the regular image URL and the thumbnail URL. That messes up the Header admin page a little but I can live with that…

DeliciousTwitterFacebookLinkedInRedditSlashdotTechnorati FavoritesDiggShare
Posted in wordpress | 2 Comments

Basic Image Editing with WordPress 2.9

The new version of Wordpress, 2.9, brings us some basic image editing which turns out to be really handy:

Thanks for that feature!

DeliciousTwitterFacebookLinkedInRedditSlashdotTechnorati FavoritesDiggShare
Posted in wordpress | Leave a comment

Speed up your WordPress blog with W3 Total Cache

W3 Total Cache is _the_ perfect plugin if you want to speed up your Wordpress installation. It comes with whole bunch of cool features, some of the most important ones are:

  • Javascript and CSS minifier
  • gzipper
  • Caching through memcached or ACP
  • Easy usage of CDN’s

For now I’m just using the Minifier and gzipper for this blog, but that even helped to improve the page performance from C to A according to YSlow:

Before optimization with W3 Total Cache After installing the plugin

DeliciousTwitterFacebookLinkedInRedditSlashdotTechnorati FavoritesDiggShare
Posted in wordpress | 1 Comment

WordPress 2.5 Upload Problem

Vor ein paar Tagen habe ich die Software dieses Blogs, Wordpress, auf Version 2.5.1 aktualisiert. Beim Schreiben den letzten Posts (Pastellfarben) hatte ich Schwierigkeiten beim Uploaden eines Bildes:
Der neue Flash-Uploader schaffte es zum einen nicht das Bild wirklich hochzuladen und brachte zum anderen den Browser (Firefox 3 RC2) zum Absturz.

Unter Googles vielen Suchergebnissen fand ich diesen am hilfreichsten:
How to fix Wordpress Image / Media Uploader

Er verweist auf ein No-Flash-Plugin, welches den Flash-Uploader einfach deaktiviert. Der Upload erfolgt anschließend mittels eines traditionellen Upload-Formulars, das zwar nicht so schön ist, aber zumindest funktioniert.

Ambitioniertere Anwender als ich finden unter anderem auf folgender Seite Vorschläge das Problem zu lösen: Image/Media Upload problems

DeliciousTwitterFacebookLinkedInRedditSlashdotTechnorati FavoritesDiggShare
Posted in wordpress | Leave a comment

XHTML Validation Error with Links Widget

XHTML Validation Error

Line 490, Column 8: ID "links" already defined

Diese Fehlermeldung erscheint bei der Validierung der Hauptseite einer Wordpress 2.3 Installation mit aktivierter Widgets Sidebar und aktiviertem Links-Widget.

Der W3C Markup Validator beschwert sich über ein doppeltes Vorkommen der ID “links”.

Möchte man nicht auf das Widget verzichten, lässt sich der Fehler nur durch Editieren der datei wp-includes/widget.php in der Zeile 402 beheben:

function wp_widget_links($args) {
  extract($args, EXTR_SKIP);
  wp_list_bookmarks(array(
    'title_before' => $before_title, 'title_after' => $after_title,
    //'category_before' => $before_widget, 'category_after' => $after_widget,
    'show_images' => true, 'class' => 'linkcat widget'
  ));
}

Einfach die “category_before”-Zeile auskommentieren. Das bewirkt, dass die ursprünglich von der Funktion wp_list_bookmarks vergebene ID und CSS-Klasse verwendet wird.

Ich habe den entspr. Troubleshooting-Eintrag auf Wordpress.org erweitert.

In diesem Sinne: “This Page Is Valid XHTML 1.0 Transitional!” ;-p

DeliciousTwitterFacebookLinkedInRedditSlashdotTechnorati FavoritesDiggShare
Posted in HTML, PHP, wordpress | 1 Comment