Since my podcasting plugin, Seriously Simple Podcasting, has become relatively popular I am doing some customer research for the next steps for the plugin’s development. Any answers you can give will be invaluable.
Archive | WordPress
RSS feed for this sectionA .gitignore file for multiple WordPress sites in one repo
I put together a .gitignore file that will exclude all WordPress core files from your repo so that only your themes and plugins will be uploaded – this works recursively, so that it will ignore all the copies of WordPress you have in the sub-folders of the repo.
Code template for a WordPress plugin
I’ve been working on a lot of plugins lately – many for my work at WooThemes and a few for my personal projects – and over time I have developed a standard code base from which I start any of my new plugins. I decided to share that code base here.
WordPress 101: Create a new widget area
Most WordPress themes come with a few useful widget areas where you can place any widgets you like. Sometimes, however, you need to add your own widget area because the theme you’re using doesn’t quite cut it. Paste this snippet in your theme’s functions.php file to create a new widget area.
WordPress: Add plugin settings link to Plugins page
When building a plugin that has its own settings page, it’s often handy to create a link to the settings page straight from the Plugins list – this saves users the time it takes to find where exactly your plugin appears in the admin menu. Here is a simple code snippet that creates the settings link for you – all you need to do is tell it where to go.
Some handy WordPress debugging tips
If something goes wrong with your WordPress install due to a faulty plugin or some bad PHP code, it can often be tricky to work out exactly what the issue is an how to fix it. Here are a couple of helpful functions and snippets that you can use to fix a number of WordPress issues.
WordPress POST data and the 404 errors: The mystery of the restricted query variables
I recently had a problem with a form submitted in WordPress returning a 404 error everytime even though it was submitting to an entirely valid URL. The form submission was managed via AJAX using jQuery.post(), so at first I assumed it was a Javascript problem – after a bit of testing, however, I discovered it was happening even if I submitted the form via PHP. In the end it turned out that the problem had nothing to do with Javascript, PHP or the server configuration, but was actually due to a restriction built into WordPress that isn’t immediately apparent.
WordPress: Add featured image to RSS feed
In order to minimise the amount of plugins your site uses, here’s a simple function I use to show a post’s featured image in the RSS feed (something WordPress does not do by default).
Make your WordPress content editor use HTML by default
A quick line of code to ensure that your WordPress content editor will always land on the HTML tab by default. This will ensure that your HTML tags & attributes are never stripped automatically.
Front-end & WordPress developer interview test
I recently had to create an interview test for a developer who has good skill in PHP, but is not so experienced when it comes to front-end coding. On the front-end side of things, the job they were interviewing for required decent HTML & CSS knowledge. With that in mind I created a little test to evaluate their skills – I’m posting it here for anyone else who needs something similar.
Creating shortcodes in WordPress
WordPress shortcodes are a handy way to add standardised or dynamic content to any post or page. Once you have used them for a bit you will start to realise just how powerful they really are. Here is a guide on how to create shortcodes that you (or your clients) can use.