WordPress Shortcode API

WordPress 2.5 extended the tagging function and added many little features. Among others the shortcode API for example, where you can add strings to a content in a fast and easy way. This makes the call from other functions in Plugins or theme functions much more easier.

The possibilities of shortcodes are immense, many other applications love this feature and with the new one you can make it even easier for the users to write in their backend. To put Shortcodes into the quick tag menu, I recommend to use the AddQuicktag Plugin.

It's easy to understand and to use. I will give a short introduction with some results below. Continue reading …

OpenSearch – Search Field For Mozilla And Internet Explorer With WordPress

Nowadays search field in your browser improved quite a bit, even IE supports OpenSearch format. But what is so great about OpenSearch and how easy it is to use with your WordPress installation has two aspects: WordPress comes already with OpenSearch and it's easy configurable with XML.

in IE 7

You just have to put a link in your theme and a xml file on your server to let the browser know that your blog supports the search field. So go ahead and improve your Plugin with little work and no use of a Plugin.

The following code should explain it. Adjust the syntax and link to the favicon and xml-file.

After you uploaded both files (favicon.ico und os.xml) add a link into the header.php of your theme. You can use the code one by one if you put os.xml in your root. After that it's possible to integrate your blog in Firefox and Internet Explorer.

The declaration of each XML tag is well documented on the OpenSearch website.

for the head area in your template - header.php:

<link rel="search" type="application/opensearchdescription+xml" title="<?php bloginfo('name'); ?>" href="<?php bloginfo('url'); ?>/os.xml" />

XML file:

Copy code, adjust and save as os.xml, then upload on your server.

<?xml version="1.0" encoding="UTF-8"?>
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
	<ShortName>bueltge.de [by:ltge.de]</ShortName>
	<Description>Use bueltge.de to search on blog.</Description>
	<Url type="text/html" method="get" template="http://bueltge.de/?s={searchTerms}"></Url>
	<Contact>info@bueltge.de</Contact>
	<LongName>bueltge.de [by:ltge.de] Weblog Search</LongName>
	<Image height="16" width="16" type="image/x-icon">http://bueltge.de/favicon.ico</Image>
	<Tags>Weblog WordPress Webdevelopment</Tags>
	<Url type="application/atom+xml" template="http://bueltge.de/?q={searchTerms}&pw={startPage?}&format=atom"/>
	<Url type="application/rss+xml" template="http://bueltge.de/?q={searchTerms}&pw={startPage?}&format=rss"/>
	<Url type="text/html" template="http://bueltge.de/?q={searchTerms}&pw={startPage?}"/>
	<Query role="example" searchTerms="blog"/>
	<Developer>Frank Bueltge</Developer>
	<Attribution>
	    Search data Copyright 2007, bueltge.de [by:ltge.de], All Rights Reserved
	</Attribution>
	<SyndicationRight>open</SyndicationRight>
	<AdultContent>false</AdultContent>
	<Language>de-DE</Language>
	<OutputEncoding>UTF-8</OutputEncoding>
	<InputEncoding>UTF-8</InputEncoding>
</OpenSearchDescription>