P2 Archives

P2 Header Ad – v1.3 released

I’ve just released a new version of my P2 Header Ad plugin, adding the following features: added translation readiness added German Translation added Spanish Translation (thanks to Andrew Kurtis from WebHostingHub) verified WordPress 3.8 compatibility You can get the latest version simply by using the WordPress updates (under Dashbaord – Updates), or download it from … Read more

How to override a parent function from your Child Theme

When you’re writing a Child Theme you can easily add your own functions to a custom functions.php file. But sometimes you want to replace or remove a function that the original theme provides. Because the Child Theme’s functions.php file is loaded BEFORE the parent’s file, you can’t just define the same function again because it would be … Read more

How to add drop down categories to Automattic’s P2 Theme

You know I love P2. I always have, and I always will. It’s the perfect theme that turns my WordPress installation into a notebook site.

Many users – me included – have often wished for the addition of categories to P2, so that when you write a post, you can add it to the category from the front page, perhaps via a convenient drop down menu.

Here’s how to do it with P2 Version 1.5.1.

And if you don’t want to hack the code yourself, I’ve got a full working project on GitHub that’s ready to rock.

Read more

Introducing The P2 Header Ad Plugin

P2 Header Ad IconI always loved Automattic’s P2 theme: it’s one of the most innovative ideas for blogging I could find. I’m using it on several of my notebook websites, including this one. I’ve been tweaking P2 for quite some time, and one thing I wanted to do is display an advert inside the P2 header.

As you may know, P2 doesn’t like child themes very much, so I wrote a future proof solution as this handy plugin.

P2 Header Ad let’s you display an advert of your choice inside the header. And when the theme is updated, your advert stays in place. Neat, huh?

Read more

How to style the Add Media button in P2

I’ve noticed that the Add Media button in P2 version 1.4.2 is a bit too low when you write a Blog Post. The button usually sits neatly above the status box, however it cuts into the top of the box due to the additional text field for the blog post – like so: It’s not … Read more

How to bring back Post Categories in P2

We’re all excited about the new features in Automattic’s P2 Theme v1.4.0 – however many of us have setup custom tweaks around Post Categories. In the latest version these have been replaced with Post Formats.

Post Formats are great, but they are limited to values defined in the WordPress core. If you wanted to create a new post menu like “critical” or “alarm” this wouldn’t work. We could use Custom Post Types to add to those formats, however it’s way too big an operation for I wanted to achieve: which is bringing back the “posting into categories” feature we’ve come to love from the previous version.

In this article I’ll show you how to back-port categories so posts will appear as they did in P2 v1.3.3 while retaining all functions of the latest update.

Read more

P2 Theme gets an upgrade: say hello to Custom Menus and To-Do List Support

Today P2 Version 1.4.0 has been released – hurra! Thanks for everyone’s hard work on this amazing theme.

P2 now boasts a couple of extra options and plenty of changes under the hood, but like many other great features those are not immediately obvious. Let me show you how the new changes work and how they can make your P2 experience even better.

Read more

How to tweak P2: adding and replacing categories

Today I’m going to tweak the marvellous P2 Theme by Automattic.

P2 is one of my all time favourite themes – not only because it transforms WordPress into something completely different, but also because it’s an innovative way we communicate internally here at WP Hosting. If you don’t know P2 yet, do check it out at p2theme.com and watch the video.

At the time of writing P2 is at Version 1.3.3 and has been since November last year. Code changes quickly, so by the time you’re reading this my ramblings may be out of date.

Let’s have a look at how we can add and amend the default categories (i.e. Status Update, Blog Post, Quote and Link).

Read more