Menu Search
Jump to the content X X
Smashing Conf Barcelona 2016

We use ad-blockers as well, you know. We gotta keep those servers running though. Did you know that we publish useful books and run friendly conferences — crafted for pros like yourself? E.g. upcoming SmashingConf Barcelona, dedicated to smart front-end techniques and design patterns.

What’s New in WordPress 3.4

With WordPress 3.4 set to arrive this week, it’s a great time to familiarize ourselves with the new features and additions. The new version of WordPress brings many improvements, including custom backgrounds and headers, a live theme-customizer, revamped XML-RPC, better support for internationalization, and many bug-fixes and enhancements. Let’s dive in and see what WordPress 3.4 has in store!


Custom Headers And Background Link

When WordPress added featured images2 as a core feature in 2.9, a new function was added — add_theme_support. It was (and is) obvious that this is a precursor of things to come: the standardization of theme features. Since its introduction, add_theme_support handles post-formats, automatic feed-links, and now in version 3.4, custom backgrounds and headers will be added to the list.

Adding a Custom Background Link

To use this feature, just call the add_theme_support() function with ‘custom-background’ as the first argument, and a list of default options as the second. Here is an example showing the basic syntax:

$args = array(
    'default-image'          => get_template_directory_uri() . '/images/bg-default.png',
    'default-color'          => '#fafafa',
    'wp-head-callback'       => '',
    'admin-head-callback'    => '',
    'admin-preview-callback' => ''

  add_theme_support( 'custom-background', $args )

Once the code is in place, you’ll see the changes take effect in the WordPress Admin:

The new custom background facility in WordPress 3.43
The new custom background facility in WordPress 3.4

Adding a Custom Header Link

Adding the custom-header options work in much the same way. In addition to the new way of defining them, you can now make them flexible in height or width, which is a great asset to theme designers.

$args = array(
    'flex-height'            => true,
    'height'                 => 200,
    'flex-width'             => true,
    'width'                  => 950,
    'default-image'          => get_template_directory_uri() . '/images/headers/header-default.jpg',
    'random-default'         => false,
    'default-text-color'     => '',
    'header-text'            => true,
    'uploads'                => true,
    'wp-head-callback'       => '',
    'admin-head-callback'    => '',
    'admin-preview-callback' => '',
  add_theme_support( 'custom-header', $args );

Once you add this code the relevant controls will show up in the Appearance tab and you will be able to set up your custom header and background-image.

The width and height is now 'suggested'
The width and height is now ‘suggested’ (displayed in bold text)

Thanks to Chip Bennett4 and Amy Hendrix5 for their excellent posts on this topic.

Live Theme Customizer Link

I think one of the best features in recent times is the Live Previews or “The Customizer”. As someone who sells themes on Theme Forest, I welcome this addition because the more I can use default WordPress options, the less support I need to provide. The best way to familiarize yourself with this feature is to watch the following great overview from Otto6. I also recommend his article on leveraging the theme customizer in your own themes7.

We’ll be taking an in-depth look at this awesome functionality here on Smashing Magazine, but for this article, the live theme-preview feature is too complex to showcase concisely. If you’d like to get started, do read Otto’s article — it has everything you need to get things set up. Here’s the nutshell version for a quick preview.

The preview facility works in an object oriented fashion. To use it you will need to cover the following steps:

  1. Add the customizer (hook it to ‘customize_register’)
  2. Add an area of customization — a section (using add_section())
  3. Add a setting you want to be able to control (using add_setting())
  4. Add the control which is used to modify your setting (using add_control())
  5. Customize the preview functionality to work in real-time

The live preview is brand-spankin’ new, but it’s already a very powerful tool. It will no doubt receive numerous updates and additions, so theme developers will finally have a common and also flexible way of letting users customize their themes.

XML-RPC Revamped Link

XML-RPC is a specification and a set of tools that allow software running on different platforms to make procedural calls over the Internet. In essence, it allows communication between WordPress and other software. The most apparent use of XML-RPC is the remote blogging services that are offered by apps like Windows Live Writer and mobile apps.

WordPress 3.4 comes with a number of XML-RPC bug-fixes as well as some heavily requested features like support for post thumbnails, custom post types and taxonomies.

Internationalization Changes Link

Back in the second half of December last year, WP Polyglots (the translation team) announced8 that they will be pouring a lot of work into the 3.4 release and beyond. As a result there a numerous upgrades in the internationalization functionality of WordPress:

  • Comma-localization (for languages like Chinese and Arabic which do not use the standard comma)
  • Some fields are now forced to be LTR (like password and login names)
  • Translatable spell-checker language
  • Single quotes, apostrophes and primes can be localized
  • Translatable time-zone string
  • Simplification of:
    • Feed-language specification
    • Start of the week
    • RTL language designation
    • Default secret-key text
    • Placeholder text of database constants
    • setup-config.php file translation
    • WP_I18N_* hardcoded translations
  • Translations are now split over three POT files — wordpress.pot, wordpress-admin.pot, and wordpress-admin-network.pot
  • Default WordPress links can be translated
  • Dashboard widgets can be translated

Beginnings Of A New API Link

While not advertised in the change-logs, Andrew Nacin9 has been working on a new API which will replace the get_themes() functionality.

For now you won’t notice much, with the main difference being that you can place template files in sub-directories. Under the hood, the new class will bring significant speed increases while searching for themes by reducing the filesystem operations to a bare minimum.

As you can see on the main Trac Ticket10 (scroll down a bit in the comments), there has been a lot of work done but the class is only scratching the surface of what we will be able to do later on. Flexible theme-management with better performance will help developers and users out a great deal — I can’t wait to see where this goes!

Bugs and Enhancements Link

With a total of 401 bugs fixed, 116 enhancements added, 3 requested features built and 52 tasks completed (at the time of writing) there is a lot more to this update than just the main features above. The WordPress 3.4 Track Milestone11 page has all the links and info you need to take a look at all that’s been done, and here’s a quick overview.

  • HTML Support in image captions #1831112
  • Twenty Ten and Twenty Eleven themes updated to support new features #2044813
  • Theme installer supports child themes #1377414
  • WP_Query core performance upgrade #1853615
  • Clicking on an empty space in the toolbar will scroll the page to the top #1875816
  • Incorrectly displayed author meta fields fixed #2028517
  • Failed cURL redirect fixed #2043418
  • Spam comments are now excluded from the dashboard #1422219
  • Theme editor support for special theme name characters #1650720
  • Retina display icons added #2029321
  • Already installed themes excluded from theme search #2061822
  • Args added to the recent post and comments widget #1615923
  • New comments can be added from the editor #1552724

Updates Of External Libraries Link

It’s always worth checking out the external library update25 for a milestone. This version brings quite a lot, to name just the most important ones:

Want To Chip In? Link

If you’d like to participate there are still a few days left and you can always help out after 3.4 as well. If you have the coding chops take a look at the open tickets32 for the next major release.

If you’re not a coder, not to worry! Just using and testing the features can be invaluable as well! You can download WordPress 3.4 RC233 or you can install the Beta Tester Plugin34 to grab all the latest nightlies and be on the bleeding edge!


Footnotes Link

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10
  11. 11
  12. 12
  13. 13
  14. 14
  15. 15
  16. 16
  17. 17
  18. 18
  19. 19
  20. 20
  21. 21
  22. 22
  23. 23
  24. 24
  25. 25
  26. 26
  27. 27
  28. 28
  29. 29
  30. 30
  31. 31
  32. 32
  33. 33
  34. 34
SmashingConf Barcelona 2016

Hold on, Tiger! Thank you for reading the article. Did you know that we also publish printed books and run friendly conferences – crafted for pros like you? Like SmashingConf Barcelona, on October 25–26, with smart design patterns and front-end techniques.

↑ Back to top Tweet itShare on Facebook


Hallo, my name is Daniel :) I build plugins, themes and apps - then proceed to write or talk about them. I'm the editor for the WordPress section here on Smashing Magazine and I contribute to various other online sites. When not coding or writing you'll find me playing board games or running with my dog. Drop me a line on Twitter or visit my personal website.

  1. 1

    Very awesome! Love seeing the WP improvements. Makes me feel very secure in my future development for my clients and their WP sites.

  2. 2

    I’m wondering when WordPress would change the XML-RPC to JSON-RPC..

  3. 3

    Matt Rittman

    June 13, 2012 10:35 am

    Don’t get me wrong, I love WordPress but the 3.4 update doesn’t seem like that big of a jump when compared to other version updates. I really wish they’d rewrite how media is handled from the ground up. Especially with galleries. When you can’t remove images from galleries without deleting them from the media library and re-uploading them…that’s a problem. Okay, enough with my rant. I know this isn’t the place for that ;)

    • 4

      Couldn’t agree more.

    • 5

      Gioacchino Poletto

      June 14, 2012 4:18 am

      You are right!

    • 6

      Daniel Pataki

      June 15, 2012 6:24 am

      I agree with you, but WordPress is progressing forward quickly nonetheless, I’m sure they’ll get to that part as well. If you’re a developer you can actually add the feature yourself into the proposed core changes :)

      I think media management has been a BIG problem for a while now. I also hope that it gets addressed soon :)

    • 7

      Oh so true.

      Going to start a new project which is going to be having “fun” with that topic a lot .. so if those self-proclaimed “Code is beautiful”-WP-Core-Devs don’t get the media troubles fixed in 3.5, I gonna pour in a fuckload of energy into developing a drop-in replacement (which of corpse the aim to being an easy replacement of the current “media management”).

      8 fucking years later – and still no proper media management? wtf!

      cu, w0lf.

  4. 8

    Blake Fisher

    June 13, 2012 1:50 pm

    I wish WordPress would simply update their Content Management System to some better organization. I’d like to see the ability to control sub-folders and better options on where media gets placed after being uploaded. Maybe batch image resizing options.

    • 9

      You can do batch image resizing with the excellent Ajax Thumbnail Rebuild plugin. Combined with defining custom image sizes its all I need!

  5. 10

    Andy Feliciotti

    June 13, 2012 6:02 pm

    Background support, brilliant, glad to add this to my next theme :)

  6. 11

    Right just in time to introduce some of the update features in WordPress 3.4, finally we can have more flexible theme customization built-in rather than going through tone of codes :) Love the custom background feature.

  7. 12

    Don Elliott

    June 13, 2012 7:17 pm

    I agree with Matt Rittman. I feel like this update is more applicable to building customizable themes for resale, not necessarily for straight-ahead web design. I love the bug-fixes, performance upgrades etc., but honestly I personally could care less about creating making theme customizations easier. The last thing I want is for clients to have MORE control over the design!

    The most significant change I can see in regards to sites we will be building is HTML captions.

    What we really need is a better media management system. After that, IMO better content area management would be idea (e.g. better WSYWIG, ability to more easily customize layouts in the admin area, etc.).

    No love lost to the WP dev team! This particular update just doesn’t excite me much.

  8. 13

    Finally it got the feature I desire the most. Customization of a theme before installation. I hope designers implement it soon on their upcoming themes.

  9. 14

    Wasn’t custom background support already added a while back?

    • 15


      June 15, 2012 11:30 am

      It was, but I don’t think you had the ability to upload from the Media Library.

  10. 16

    I was just reading the specs on WordPress’s site, but I find this article to be much more useful – great post!

  11. 17

    Sounds good, waiting for 3.4.

  12. 18

    In my opinion WordPress development team should do one release concentrating only on performance and making memory usage smaller.

    If I have to pick one important upgrade in this release, it is the splitting of the pot-file in three files. Most of the websites need to be translated only in front end.

    Things like theme customizers are only bloat.

    • 19

      Daniel Pataki

      June 15, 2012 6:27 am

      I agree with the first part of your comment but not the second. WordPress can get a bit unwieldy if you have a big site but if you build it smartly it shouldn’t be a problem really.

      I don’t agree that the theme customizer is bloat though. It does not use resources at all since it is not used for loading the site but adds a LOT to people who develop themes for marketplaces. I’ll grant you that this is a relatively narrow niche but it contributes to the availability of customizable yet standardized themes which is a great help.

  13. 20

    Maybe it’s me, but why does WordPress make us add code to files? When they update, why don’t they just automatically add the code to the appropriate files so the functions are already in place when we upgrade? This would be very beneficial to people (like me) who DO NOT want to constantly futz with code. Aaaargh!

    • 21

      Daniel Pataki

      June 15, 2012 6:28 am

      Are you sure you’re doing it right? You should be able to upgrade WordPress without fiddling about with anything at all. You can just go to upgrade in the dashboard and all should be well!

  14. 22

    Thank you for the great overview! The upgrade offers lots of great new features, indeed, and I am excited for it. If I may, though, I’d like to suggest first backing up your website. In the event that the update does something to your site, CodeGuard ( will let you revert to the previous version with the click of a button.

    I hope this is of help.

  15. 23

    Mark Simchock

    June 15, 2012 11:11 am

    Don’t get me wrong, I love WordPress. It’s a beautiful piece of machinery. I continue to use it often when it makes the best sense.

    On the other hand, when the going gets rough (read: larger more complex projects with not-so-typical for WordPress functionality) I still believe ExpressionEngine ( is a better choice. EE is the sweet spot between WP’s website in a can approach, and full, ground-up custom PHP dev.

    Yeah I know…I’m going to WordPress hell :)

  16. 24

    While I like how fast WP is progressing, and like the new changes, I am really waiting for WP to get a GUI interface for creating Custom Post Types, Custom Taxonomies, and Custom Fields. I typically use the paid CustomPress plugin, but WP really needs something like that in the core to compete with CMS’s like Drupal.

    • 25

      Don Elliott

      June 18, 2012 7:59 pm

      In the meantime, checkout Eliot Condon’s plugin Advanced Custom Fields. It’s one of the best WP plugins out there and creates a beautiful native looking UI for clients. Way under priced too!

  17. 26

    Sounds good, waiting for 3.4.

  18. 27

    Patrick Samphire

    June 17, 2012 2:26 am

    While I don’t object to the better support for custom backgrounds and custom headers, I can’t help but feel that it is a couple of years out of date. With Responsive Design becoming increasingly important, those customizing their sites will need to be able to add multiple backgrounds and headers for different break points.

    Obviously, developers can add this functionality to their themes, but it would nice if it could be baked in as this basic functionality, which is clearly designed for fixed-width sites, is.

  19. 28

    I like the live updates feature.

  20. 29

    James Jackson

    June 21, 2012 4:14 am

    I’m wondering when WordPress will make responsive images a key part of its functionality, like functions that call smaller file sizes for smaller screens and edit image options that don’t give images fixed widths in the html.


↑ Back to top