Filter caption-Shortcode in WordPress

The title may not speak for itself and therefore I will explain a little more on the topic and do not just put a code snippets on this post.

If you use the „Mediauploader“ in WordPress not just to load images, but also for integration in the post or page, then a Shortcode will be created and be insert in the content if you leave a picture title for this picture. The title should be maintained, because it will be used as alt-attribute to the img-Tag.

Not every user is satisfied with this issue and I'll show, how you can change the output.
Continue reading …

Tweet This with WordPress

Twitter seems to continue to gain in popularity and one or the other has even completely move - not a blog anymore, only an address in Twitter.

After going through my subscriptions in my feed reader, I noticed several articles where one or the other Plugin was recommended, which place a Twitter button to recommend an article on your Twitter. Most Plugins have a function that takes place in the template of the integrated theme.

As so often, this is a little exaggerated, and as in the past with the inclusion of links to social bookmark services, there is also a simple solution with the help of a function in the WordPress core.

Continue reading …

rel=”canonical”-URL for WordPress Theme

Duplicate content is always an issue in search engines, especially in the context of content management systems and blogging applications. Therefore, they decided together (Google, Yahoo and Microsoft) for a notice using the link tag.

In essence, provides the tag with the rel attribute canonical only a reference to the preferred URL. Once again a new discussion started in the WP Hacker List about this new possibility, which I can not understand. WordPress offers plenty of opportunities so that this form is not necessary to be included in the core, there is sufficiently different and more important topics and the content of a theme should be broadly still lie with the developer. I will show you in this post a simple and quick way to integrate the attribute.
Continue reading …

Change your WordPress Theme on Dependency

WordPress is sometimes not only in use as a blog platform, also as CMS application or for a presentation of photos or other purposes. Many times you like to have a different design depending on the purpose of your WordPress blog within your website. Thus, most of the photo blogs having a different design than the weblog.

In fact you can achieve that quite easily and do not always need to create an extensive query in your template or even a different installation of WordPress setup. You can also deal with the following solution, giving you a better overview of the separate themes. With this solution you have many possibilities to implement individual designs.
Continue reading …

Numbering your comments, pingbacks, trackbacks or all

Since WordPress 2.7 exists an API for the comment area. Thereby you can purge the PHP-portion within comments.php. Jean-Baptiste shows a simple solution to count comments. This solution is very well known and get used pretty much since the first release of WordPress. But if you like to have a filter, which counts only the trackbacks or only the comments, then this solutions is worthless. Besides that, the How To is pretty poor and PHP-rookies could have troubles with it.

Relating to this and because of many questions about this topic I show you two simple functions, which you insert in your functions.php of your theme. Normally they get used as output in your comments.php.
Continue reading …