Replace p-Tag on Images in Content of WordPress

Personally I think the use of HTML5 makes sense and I like the new possibilities, also in the field of semantics. WordPress has a feature on delivering content that come from the editor – setting breaks and paragraphs. Since forever WordPress is the reason for that, not TinyMCE and the same applies to the integration of images or other elements of this kind. In order to use HTML5 in a perfect way I had to replace the p-Tag with the figure-Tag and so is this small filter was created.
Continue reading …

Force Reload of Scripts and Stylesheets in your Plugin or Theme

If you're developing a WordPress theme or plugin you may have had the problem that scripts or stylesheets are not reloaded from the source when you refresh the page because they are cached somewhere on the way from the server to the browser. There are various methods to suppress this behaviour like disabling the browser cache in the options or by using a web development add-on. Sometimes this simply does not work because it's not always apparent where the content is cached since there are so many possibilities and you may have missed to disable all of them.

WordPress provides a simple method to ensure that all stylesheets and scripts are reloaded from the source when they have changed by providing a version parameter:

wp_enqueue_script( $handle, $src, $deps, $ver, $in_footer );
wp_enqueue_style( $handle, $src, $deps, $ver, $media);

You can increase the $ver parameter every time you've changed the files:

wp_enqueue_script( 'my_script', 'my_script.js', '', '0.11' );
wp_enqueue_style( 'my_style', 'my_style.css', '', '0.11' );

The URL of the stylesheet/script will be changed to '.../my_script.js?ver=0.11' so that every caching system detects the changed file and reloads it from its source and the user always gets the recent version.

But to change the version number manually every time in the development stage would be a bit tedious and you're a programmer, right? So let's automate this:

wp_enqueue_script( 'my_script', 'my_script.js', '', time() );
wp_enqueue_style( 'my_style', 'my_style.css', '', time() );

The value of time() changes every second so the version ID of the file changes constantly and it's reloaded from the source and not from some cache.

It's a bit disadvantageous that you have to substitute the time based version parameter by a "real" version number every time you deploy your code since the actual user still should have the benefits of cached scripts and stylesheets. Let's extend the idea:

define ('VERSION', '1.1');

function version_id() {
  if ( WP_DEBUG )
    return time();
  return VERSION;

wp_enqueue_script( 'my_script', 'my_script.js', '', version_id() );
wp_enqueue_style( 'my_style', 'my_style.css', '', version_id() );

This way you can make sure that in your development environment everything is reloaded from source all the time but a productive server takes advantage of caches.

Frank holding a session at WordCamp Germany

Winner of Xtreme One WordPress Framework And Pictures of WordCamp Germany!

Thanks a lot for the great participation to win 5 Xtreme One WordPress Framework licenses inclusive a Childtheme!

We did the drawing of the winner this weekend at the WordCamp Germany right after our session, where we also introduced the new features of the upcoming version 1.4. Congratulation to all winners and if you didn't win, get a WordCamp Germany special discount of 20% until October 3rd 2011. Just use the coupon code WCK11.

The lucky winners are:

Gabe Casalett
Affan Ruslan
محسن غیاثی (

We will contact each winner and they can also choose their favorite Childtheme. Congrats!

Everybody else might grab a copy for 20% discount!

You can check out some pictures of WordCamp Germany 2011 in Cologne here.

How to Add and Deactivate the new Feature Pointer in WordPress 3.3

With WordPress version 3.3 comes with the Feature Pointer a well-known idea from other tools. We know this for example from Gmail or Google Doc where they notice you of new features, in which they point with bubbles to these new features. In WordPress 3.3, the Admin Bar has been redesigned successfully - I think - and this is the first time the feature pointer points to it.

Continue reading …

Win 5 Licenses Of The New WordPress Framework Xtreme One Version – Including Awesome New Features!

With version 1.3 many features were added to improve the workflow and significantly improve page performance. An overview of all the special features of Xtreme Theme can be seen here:

Besides many small changes under the hood, the new Widget System Extensions is one of the biggest innovation in Xtreme One.

  • For multisite installations widgets can be declared as a side wide widgets, which means they appear on all existing and future blogs.
  • Widget Manager to manage various features as well as turning on or off the widgets.
  • Extremely comfortable widget filtering logic, see video: Different sliders for different categories including conditional editor with drag and drop and syntax check.
  • Quick duplication of widgets for multiple use.
  • Simple combining multiple widgets to a tabber, see video: Create a tabber from widgets.
  • Scripts will only load when they are needed.

Also new are the jFancy Mediaslider and a Carousel Slider, which are available for posts and as a media slider. With the media slider you can just insert images from your media library instead of choosing an image of a post. You can link these images either to the attachment page, the corresponding article or a user defined link.

The Xtreme Social Widget added the new Google+.

Another feature are the subtitles for posts, pages and custom post format.

Xtreme One Framework supports post formats. Thus it is possible with any Childtheme, to operate a Tumblr-like blog.

The selectable positions of the navigation has been increased to 12.

Xtreme One costs only $79,95 and is available here.

How can you win a license?

We are giving away 5 licenses for the Xtreme One Framework with a Childtheme of your choice. One license will be given away among the commentators in our comment area. 2 more will be raffled among those who tweet with the Hashtag #xtremeonewpe about Xtreme One and two licenses will be raffled among all the bloggers who write about Xtreme One in their blog and leave a trackback here. The raffle will run until September 23rd 2011, 23:59:59 PST Time.

The winner will be announced on September 24th at the end of our Xtreme One session at the WordCamp Germany in Cologne.

Good Luck to everyone!

We just announced the winner of the licenses here:

Congrats to the winner!

Everybody else can grab a 20% discount for Xtreme One until October 3rd 2011 with the coupon code: WCK11