I’ve been working on a new plugin for WordPress called Cookies. It shows you a list of all cookies on your current site. Once activated, you can find this list under Appearance – Cookies.
In addition, you can also display this list to your visitors by adding the shortcode [cookies] to any post or page. Many of those cookies are used by WordPress to track things such as “are you logged in”, so I’ve added an option to filter WordPress related cookies out. This list is available with the [cookies-nowp] shortcode.
I’m still putting the finishing touches on the plugin, but I’m planning to submit it to the WordPress repository. For now, feel free to download it from my GitHub repository.
Let me tell you a bit about how this plugin came to be.
This morning I felt like a bit of coding, and something that’s been on my to-do list for a while was to update my Child Theme Wizard plugin. It’s been making over 10.000 users happy since 2013.
The main reason for the update was to update the compatibility flag with WordPress 5.1 – it was already compatible with the latest version, it just wasn’t explicitly set. On this occasion I found a couple of other items I could improve upon:
updated the link to the WordPress Codex about Child Themes
verified compatibility with WordPress 5.1
updated social media links (added YouTube and Patreon, removed Google+)
added theme version to query, as suggested in WordPress Codex
The last item was new to me and doesn’t make a difference to how your child themes are created, however since the Codex suggests to create child themes this way, I thought I’d better follow best practices.
And one final thing I’ve streamlined was the code itself, both in the plugin and in the generated code. It’s now a bit more spaced out, improving readability and updatability (if that is in fact a word).
Questions, suggestions, translations and pull requests are always welcome!
What is Zen Dash again?
Zen Dash is a magical plugin that lets you get rid of the myriad of options in the WordPress admin area. I’ve created it because sometimes less is indeed more, and new users can get overwhelmed by the sheer volume of menu items, dashboard widgets and upgrade notifications.
While it is possible to let casual users have privileges less than administrators (and therefore see less items), I found this ineffective. With Zen Dash you simply flick a switch and make things disappear that you don’t want to see everyday. You can just as easily bring them back if you need them.
You can read more about Zen Dash in my release post, which even includes a video on how to use the plugin.
I’ve released a new version of my popular Child Theme Wizard plugin today. Everything remains the same, except for one thing: the parent theme is no longer loaded via CSS, it’s now being loaded via PHP. Let me explain why.
When I wrote this little tool in 2014, the best practice to create a child theme was to load the parent’s style sheet via CSS. This was done with an @import statement, like this:
While this approach works just fine, this is no longer regarded as the best approach to the puzzle. That’s because the parent theme’s full path is hard coded into your child theme, and should the parent theme ever change it’s folder name, your child theme would stop working.
There’s a better way to get the same thing done by loading the parent style sheet via PHP in the functions.php file. Here’s how it’s done:
I’ve just released Version 1.3 of ZEN DASH and thought a quick video demonstration is in order – and here it is:
In this podcast I will show you how to use ZEN DASH for WordPress and explain how you can easily hide menu options, dashboard widgets, admin footer links and suppress Update Notifications (for WordPress core, plugins and themes).
This plugin comes in handy if you’d like to hide functionality before giving the site over to a client. For example, you may not want your client to have access to plugins so he can accidentally deactivate a shopping cart and break the site.
I’ve just finished writing a new WordPress Plugin to help you create Child Themes with a single click, and no need for any external tools.
The Child Theme Wizard is a super slim assistant which can be accessed under Tools – Child Theme Wizard. Pick a Parent Theme, enter additional information, click Create Child Theme and you’re all set!
Child Theme Wizard allows you to enter the following details:
You can pick any existing theme that is currently installed, and you won’t be able to choose other child themes as parent themes (obviously). Child Theme Wizard will even pre-populate some of the data if it’s available from your Profile Information.
You can choose to include the GPL License to make your theme ready for Open Source Distribution. It even creates a thumbnail so you can tell your Child Theme apart from your other themes.
What does Child Theme Wizard do?
To create a Child Theme you have to
create a directory on your server
create a file called style.css
paste template code and tweak it
make sure you get your template path right
add an empty file called functions.php
add a screenshot.png file to make it look pretty
This usually requires an FTP client with credentials, as well as a text editor, or another web interface – in short: it’s much more tedious and time consuming than it really needs to be. Child Theme Wizard does it all conveniently from within the WordPress Admin Interface with a single click.
Why do I need to use Child Themes again?
If you make any modifications to the CSS or functionality of existing themes, and you’re tweaking core files, your changes will be overwritten if your current theme is updated with a new version.
Child Themes however isolate your changes into dedicated files. The Parent Theme can be updated safely and your tweaks remain intact.
Watch the video
In this video I’ll show you Child Theme Wizard in action:
v1.0 (13/03/2014) – Initial Release
I’d like to include the following features in future updates:
o option to support custom thumbnail uploads
o export theme option
o add translation
Download and Contribute
Child Theme Wizard is available from the WordPress.org repository. You can download it simply by searching for “child theme wizard” under Plugins – Add New and following the instructions. Or you can download it here:
I’ve just released a new version of my (totally unpopular) Disk Space Pie Chart plugin for WordPress. The update addresses the background colour of the pie chart which worked well with WordPress 3.7 and below, but now that we have a snazzy new colour scheme in the admin interface, I made sure it still looks good.
You can download the plugin from the links below, or just hit “update” when you’re in the WordPress backend next.
Today I got a lovely request from Andrew over at WebHostingHub.com who asked if he could translate my P2 Header Ad plugin into Spanish. “Of course”, I thought – and then I realised that I knew not much about how to get a plugin translation ready. I knew POEdit of course, but how to make my plugin speak another language wasn’t really clear to me.
An online search didn’t really reveal all the answers – snippets here and there, but not the whole picture. So here it is – step by step – as of December 2013.
In a nutshell:
add a text domain
replace all strings with compatible PHP calls
generate a .pot file
open it it POEdit and translate your strings
switch WordPress to another language to see if it actually works
I 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?