Pages & Subpages – Is Parent?

WordPress allows to create sub-pages in your backend. This is why many uses WordPress as a CMS. Sometimes you like with the help of the Conditional Tags to start several queries with a certain respond – but then you see frequently in the template static queries on any ID of a page.
But it's possible to handle this differently, and simpler when it comes to pages or sub-pages of this page.

With this solution you can, for example, in dependence of a page, load a specific layout. This small request I'll take as an example and show a function that gives queries to pages / sub-pages and I will show an example in action.
Continue reading …

WordPress 2.8 – Small Insights

WordPress sticks to the publication date in April this year. In advance, I would like to briefly mention some innovations, which from my personal point of view are quite exciting.

  • New Template Tag: the_modified_author()
    In the use of different authors long awaited, in 2.8 available
  • Widget API
    Widgets have been loved by most users and tolerated by developers. The new API will simplify it and the access to the class makes this possible. This means that multiple instances now finally possible.
  • Optimized loading of JavaScript
    Since 2.7 is clean and checked loading of JS involved. Additional functions provide a control of the loading process and dependency. Now, via WordPress, scripts are going to summarized and returned in a single call. You can also include scripts in the footer now, directly through the targeted functions.
  • More options, when making the frontend, with the new Template Tag body_class()
  • SimplePie in Core
    With version 2.8 Magpie is removed and the well-known SimplePie project comes into the core; in my view in relation to use of feeds, especially in the ATOM standard, a lot more comfortable.

What are your most exciting innovations in 2.8?

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 …