Changes to Registering Custom Post Types in WordPress 4.4

Whilst building a plugin recently I found a change in WordPress 4.4 which actually broke my plugin, but was very easy to fix. The problem was with a custom post type that had completely disappeared from the admin menu. Here is why it disappeared and how I got it back again!

First a little background about the plugin in question. It used a post type in order for the user to add a single post. The content of this single post was then outputted with a shortcode and therefore I did not want the post type to have a permalink page at all. For this I had set the public argument used in register_post_type() to false. I also did not want the regular post type menu item to show in the backend, as I was adding my own menu item and therefore I had set the show_ui argument to false too. This worked fine in WordPress 4.3.1 and when I added my own menu item using add_menu_page() which used the edit post screen for the content for a post within the custom post type the menu item showed up no problem.

When I recently upgraded the site to WordPress 4.4 there was a large problem. The menu item completed disappeared. After some digging around and making some changes to test what was going on, I found the problem. The fix was to set show_ui to false but to set show_in_menu to true.

When I tweeted about this issue, John Blackbourn, one of the core developers kindly responded with a link to a post outlining the changes.

WP Skeleton – A Starter Repository for Building WordPress Sites

Being a WordPress developer I build a lot of sites and getting things started can take a lot of time. Getting your site, themes plugins etc. ready to go, seems to always take longer than it should, as well as being something that we keep repeating. I therefore went about solving this in a fairly low level simplified way. What I created, I am calling WP Skeleton.

View WP Skeleton Code Repository on Github

Continue reading WP Skeleton – A Starter Repository for Building WordPress Sites

Talk: Beyond FTP

We have all used FTP as developers to move files from editing them locally to our production server. Developers know the problems this can cause and why alternatives are needed. In this talk I will introduce my WordPress development process and how you can move on from FTP to a more robust development and deployment system.

View the slides

Introducing the WP Job Manager Broadbean Add-on

A few years ago I built the WP Broadbean WordPress plugin in order to integrate Broadbean job posting with a WordPress website. This is has proved a highly successful plugin with a number of sites now actively using this. In fact Broadbean themselves are keen for WordPress users to adopt its use. Recently I have been working on another solution for WordPress sites which integrates the very popular WP Job Manager plugin with Broadbean. Allow me to introduce the WP Job Manager Broadbean Add-on.

WP Job Manager Add-on Settings TabWP Job Manager Broadbean Add-on

The WP Job Manager plugin has a number of add-ons that are listed on the add-ons page of the website. You will now see a Broadbean add-on listed, and many thanks to the team for allowing this add-on onto their page for third party add-ons.

I have decided that the plugin will be a paid for product, much like the other add-ons on that page and also that it will be licensed. like many other commercial current commercial plugins. There are two type of license, each lasting for a period of 12 months, giving purchasers support throughout that period as well as updates. The licenses are either for 1 site, priced at £99.99 or for unlimited sites priced at £199.99.

Getting Started

The add-on is activated like a normal plugin would be and contains a settings tab under the WP Job Managers settings page. On here users can set a username and password for their incoming feed as well as activating their license. Also on this page are instructions on what information to pass through to the team at Broadbean in order for them to send the job data to your site.

It is worth noting here that the plugin is dependent on data being sent from Broadbean. This is something that would be specific to your site and therefore needs to be built by the Broadbean integrations team. For this reason they will probably have a charge for this too and it is worth speaking with your Broadbean account manager about this.

So if you are a recruitment business using Broadbean and you have a WordPress website of you own running the WP Job Manager plugin to show jobs on your site, you can know include jobs you post through Broadbean on your site as well. There will no longer be the need to add them in two places!

View the WP Job Manager Broadbean Add-on
Purchase the WP Job Manager Broadbean Add-on

AJAX WordPress Search

You know when you type a search in Google and then it always shows some suggestions below, well recently I had a client who wanted something very similar using their WordPress site. This posts looks at how I implemented a similar feature to a site to show any posts as suggestions, which met the search criteria.

The site in question was a recruitment site and one that I was tasked with integrating my ever increasingly popular WP Broadbean plugin with. Therefore the site had lots of job posts, which are a custom post type and the clients requirements were that the user should be able to search for a job by title (and other parameters which are not relevant here so I won’t go into those details).

Continue reading AJAX WordPress Search

WordPress Cumbria

WordPress Cumbria started out just over 12 months ago with the first meetup on the 9th September 2014. Since then we have had a number of meet ups, all managed through our meetup.com account and they have gone very well.

A few weeks ago I became a co-orgnisaer thanks to an invite from Jack Lenox, who started the group. I was honoured to accept this invite and look forward to working with Jack and other members of the WP Cumbria team to promote the meetup and make it run as smoothly as possible for the benefit of the WordPress community in and around Cumbria.

Check out the WP Cumbria website or follow along at meetup.com. We look forward to seeing you at our next event.

Talk: A year in freelancing – lessons learned, tips and tricks

After freelancing for just over a year now and having left a well paid job this talk outlines lessons I have learned from taking the plunge to being a freelancer and some tips and tricks I have learned along the way. This talk will benefit anyone looking to become a freelancer or any current freelancers that are looking for some tips and tricks on getting by.

View the slides

Below is some feedback I received via Twitter:

Sex Degrees of Separation Plugin

Recently I had the pleasure of working on quite a high profile plugin for Lloyds Pharmacy working as part of a team with Keith Devon of White Rock Design. The plugin was part of a campaign to run in Sexual Health week and was called Sex Degrees of Separation.

Lloyds wanted to educate people of the number of indirect sexual partners they will have had. The plugin has a front end interface where users simply enter the number of sexual partners they have had (male and female) in specific age groups. Once they hit calculate it crunches the numbers with some cool javascript (that bit was done by Keith!) and tells you your result. Click the image below to have a go!

Screen Shot 2015-09-24 at 13.58.08

My part in the plugin was to build all of the back-end functionality to allow the client to be able to edit the different parts of the plugin. For example editors can change the text output for the different sections as well as the button labels.

As the data changes over the current months/years they needed to be able to edit the data for each age group. This was achieved by creating a data edit screen in the WordPress admin. I went for a tabbed settings screen to separate the different settings into categories to make this easy to implement.

The plugin was launched a couple of weeks ago and received some amazing coverage in the press. Some links below are to some articles that I stumbled across:

Big thanks to Keith for bringing me in on the project.

Review a Plugin Today

Recently I was a guest on the Relative Paths podcast and had a great time chatting for Ben and Mark about WordPress plugin development. One things that came up was donations and reviews for plugins that I have in the repository and how many I get.

Many developers across the world develop open source software, of course not just for WordPress and they share it with the community to allow them to take advantage of that development. They do this without every earning any money and this takes time and energy.

Some of the best plugins for WordPress are completely free. The developers take their own time to develop them, improve them and then pass that onto the millions of WordPress users around the world.

One of the questions that came up in the podcast was do you ever receive any donations? My answer was straight forward in that I don’t, but I don’t really ask for them either. However one thing that I, and I know lots of other developers love receiving are positive reviews of our products [plugins], that¬†tell the rest of the community how good (hopefully!) they are.

You can’t underestimate the feeling you get when someone indicates to you (I get an email from WordPress.org when someone reviews one of my plugins) that they are using your code (your plugin) on their site and they love it.

So if you use a plugin on lots and sites and you love, I urge you to go a give it a 5-star review on the WordPress.org plugin repository. It only takes a minute but the developer of the plugin will love it. Go and make their day!

I am off to do a few reviews myself now!