Keith Devon


Author: Keith Devon

Thoughts on WordCamps

I’m feeling inspired, confident, connected, and very very tired.

I’m on the train home from WordCamp London 2019.

Recently, I’ve seen some tweets and heard people talking about how they don’t go to WordCamps anymore – or that giving talks at them is a waste of time.

Everyone has their own reasons and motivations for attending, or not attending. Everyone has their own unique experiences of an event. I’m not here to say that anyone is right or wrong.

WordCamp ROI

It can be hard to make a business case for attending – I get that. Unless you come away with a handful of strong leads then maybe the direct return on investment (ROI) doesn’t measure up well.

But WordCamps and other conferences are much more than what you can measure. The benefits are, in my experience, largely intangible.

I’ve had countless conversations this weekend. Some with people that I know well and see often. Some with people I met at events years ago. I also met a whole load of lovely new people.

Will any of these lead to more work? Possibly, maybe not – I don’t really care.

So what are some of the reasons that I would pay for travel, accommodation, sponsorship and be away from my family for a weekend?


It’s so easy to get stuck in a rut at work. You build up processes and get familiar with certain tools and technologies.

Events can be a great way to find new ways of working and thinking.

I’ve seen things that people are doing with WordPress and with their businesses that blow my mind.

I feel empowered and inspired to get back to work and build bigger and better things.


Often, work can feel overwhelming. Running a small WordPress agency means that I’m (jointly) responsible for making important decisions about the direction and current function of our business.

One thing that nearly every event has taught me is that we’re doing a pretty good job.

Once the veil of social media is removed, you find out that other business owners and developers are often experiencing the same trials and tribulations as you are.

The people who appear to have it all figured out are just humans with fears and worries, and who sometimes make mistakes.


As a remote worker, it can be difficult to feel truly connected to the community, and even your own colleagues.

In an over-connected world, people are feeling more and more isolated.

Events like WordCamps are a great opportunity to build and maintain those real human connections that are so vital to our well-being.

It’s also a chance to talk shop without people’s gaze drifting and eyes glazing over. It’s a rare treat to get to talk to people as passionate about our industry as I am.


I’m a husband, a Dad and a business owner. Sometimes life is so busy and tiring that ‘fun’ is hard to come by.

Getting away for a couple of nights, having a few beers and not worrying about childcare, chores, etc. is a very special treat for me! It’s a chance to reset, recharge and let my hair down a bit.

But right now I’m tired and I can’t wait to go home.

Thanks to all of the organisers, volunteers, speakers, sponsors and attendees for creating such a wonderful event.

I’m not sure what the financial ROI will turn out to be but I know that emotionally it has paid for itself many times over.

See you all again next year?


This is my personal blog, which I’m going to try to use more. If you want to know more about my WordPress development work you can do so on the Highrise Digital site.

Getting back to blogging

It’s been years since I did any significant work on my own website. All of my attention has been on my WordPress development company.

This site, which used to house all of my work, thoughts, and online identity has been gathering dust and was starting to smell a bit musty.

A few things have conspired to encourage me to update the site, ditch my old theme, and hopefully start using the site for blogging again.

Dusting off the old blog

As I’ve said, it’s been a long time since this site had any love. The design was looking pretty dated, the content was old, and every time I thought about it I felt a bit sad. 🙁

I’m not really using this site professionally any more. All of that happens on my WordPress agency website now. But I’d like to maintain a bit of a personal presence online.

Personal blogging is back

There has been a subtle trend of people moving away from Facebook, Twitter, etc and starting to publish content on their own domains again. This has been led by various ownership, trust, security and privacy issues, as well as the general desire to spend less time on these platforms.

I’ve been inspired by my co-founder, Mark Wilkinson, who maintains his personal blog and updates it with both personal and professional posts. He uses it like a kind of diary, a reference point for his life.

I love this approach, and since leaving Facebook earlier this year (I haven’t deleted my account but haven’t logged in in over 6 months) I’ve missed having somewhere to log significant events, share photos, and write about things that interest me.

Going green

I’ve made some personal changes towards living a more sustainable lifestyle. Things like giving up meat and dairy (mostly!), buying less plastic, etc.

Professionally, I’ve been wondering for a while now about bringing more ‘meaning’ and ‘purpose’ to what I do. I love building websites, but it’s rare to feel that the work Ido has benefits for the planet.

At the last WordPress London meetup, I listened to a talk, “Why a greener web is good for everyone“, by Tom Greenwood of Wholegrain Digital. He was speaking about sustainable web design, and how the internet is one of the biggest emitters of greenhouse gasses. It felt like a turning point for me. Maybe this is my chance to combine the work that I love with a worthy cause.

My first step was a quick chat with Tom today about how to get involved. Immediately after the call, I decided to switch my site to use the Susty theme. It’s a VERY lightweight theme with the aim of reducing the carbon footprint of the website. More on this in a future post!


Introducing Highrise Digital

As you might have seen already, 2016 has brought some significant changes to my work life. After six and a half years of being a WordPress freelancer, I’m excited to announce the start of a new business and partnership – Highrise Digital.

I’ve loved freelancing. I’ve loved the freedom that it brings, both in terms of working hours and location, but in also in who I work with. Over the years I’ve managed to build up a reputation in the industry, and a great roster of clients. I’d say that the freelancing journey has been a success.

However, for a long time now, there have been niggling feelings that freelancing wasn’t meeting all of my needs. One of the recurring niggles is that I’d like to be able to focus a bit more on business development. I wanted more time to work ‘on the business’ rather than ‘in the business’.

Another of the niggles was teamwork. I love to work with people. As a freelancer I was working with clients, there wasn’t anyone on my team for the long-haul – someone with shared interests and motivations. As long ago as 2013 I stated that I was looking for a business partner. I wanted someone to bounce ideas off, someone with whom I could share the highs and get through the lows.

In late 2014 I met Mark Wilkinson at a WordPress London meetup event. Mark was giving a talk – on workflow I think – and soon after I needed some help with a large project. I got in touch with Mark, we started working together, and we’ve continued to work on projects together ever since.

A year later, in late 2015, Mark and I were discussing our careers and where we wanted to take things. I mentioned that I’d be interested in joining forces and starting a business together, and we decided to talk about it after the New Year.

So, in January 2016, we got together for two days in London and discussed our potential business. In those two days Highrise Digital was born.

(You can read more about the naming and branding journey here: What’s in a name or a logo?)

What is Highrise Digital

Essentially we’re a WordPress development agency. Our focus is on custom WordPress themes, plugins and support. In that sense not much has changed. So what has?

Broader, deeper expertise

Mark and I, although both WordPress developers, have slightly different areas of expertise. Mark is a master of customising the WordPress admin. He can make WordPress do what it’s supposed to do – i.e. make content management easy. Mark is also more experienced with API integrations and plugin development.

I’ve always been more comfortable in the front-end – primarily custom theme development. I’m also now able to focus more on marketing and sales, two areas that I’m really interested in.

By splitting our roles within the company, we’re able to focus on what we’re good at and go deeper into those skill-sets.

More capacity

It sounds obvious, but we now have twice the capacity. Many projects have tight deadlines, and we’re in a better position to deliver on these as a team.


I’ve also aimed to be highly professional in everything that I do, and Mark is the same. Already though, we’ve started to take every little interaction and process more seriously. I think it’s because we are accountable to each other, that now when something needs to be done, it get’s done the right way, first time. We’re also working hard on processes so that we can deliver a consistently high level of service.


That’ll do for now I think. All I really wanted to do was to let you know about the change. What does it mean for you? Hopefully it just means a better WordPress development service.

If you’d like to talk to us, you can find us over at

Google penalises sites that aren’t “mobile-friendly”

As of today (21st April 2015) Google will be actively penalising websites that aren’t what they call “mobile-friendly”.

Back in November 2014 Google announced that it was adding a “mobile-friendly” label to mobile web searches. This was to ensure that mobile users could choose to view content that was suitable for small screens using a touch interface.

Since then Google has been contacting website owners and administrators advising them to update their sites so that they are “mobile-friendly”. Now they’ve taken action, and are using the “mobile-friendly” label as an active ranking signal.

This means that if your site isn’t mobile friendly, it’s likely to start dropping down the rankings, if it hasn’t already.

If your site does have the mobile-friendly label, then you’re likely to see your search ranking improve.

What does “mobile-friendly” mean?

In Google’s words:

A page is eligible for the “mobile-friendly” label if it meets the following criteria as detected by Googlebot:

  • Avoids software that is not common on mobile devices, like Flash
  • Uses text that is readable without zooming
  • Sizes content to the screen so users don’t have to scroll horizontally or zoom
  • Places links far enough apart so that the correct one can be easily tapped

There’s a really easy way to test if your site meets the”mobile-friendly” criteria, and that is to use Google’s “Mobile Friendly Test”.

What does this mean for WordPress sites?

WordPress websites aren’t implicitly mobile friendly or not, it largely depends on the theme that you are using.

If you are using a theme from the theme repository, or a premium theme that you purchased, check if there is an update to the theme available. Always back up your site before updating!

Many people have custom built themes, or third-party themes that have been customised. If this is the case you will need to contact a developer to help you to convert your theme to a responsive layout.

I recently did this for the website that I built over three years ago. The conversion took about 2.5 days.

Google have created a guide specifically for WordPress websites here:

Act now to avoid penalties

If you only take away one thing from this post – test your website using Google’s tool.

If you find that your websites isn’t mobile friendly get it fixed as soon as you can.


How (and why) to use on your WordPress website

Search engines have a big problem. There is so much data out there and it’s hard to work out what is what.

Humans are great at inferring the context of web content, but this is much more difficult for Google, Bing, Yahoo!, etc..

That’s why the biggest search engines have come together to create a standard way to add structured data to your website. What they have created is called In their words: is a joint effort, in the spirit of, to improve the web by creating a structured data markup schema supported by major search engines

Why you should be using markup

You’re probably still wondering why you should take the time to add Schema markup to your website. The simple answer is that it will probably improve your search traffic. Google, and other search engines, want to display the most relevant search results. If it’s clear what your web page is about, then it’ll have more confidence in it’s relevance. Here’s what they have to say on the topic:

These projects help you to surface your content more clearly or more prominently in search results.

Google back this up on their website:

When your web pages include structured data markup, Google (and other search engines) can use that data to index your content better, present it more prominently in search results, and surface it in new experiences like voice answers, maps, and Google Now.

While Google won’t come out and say that using will definitely have a positive impact on your search rankings, they don’t deny it either (see their ambiguous answer here: But what they do say is that it’s likely to help your content to be presented more prominently, which is often as part of rich snippets (I’ll explain these below).

While using markup may not improve your search rankings (yet!) it will help to give your content more prominence on search results pages.

Is everyone using markup?

In my experience markup is still underused. There are clear benefits, yet adoption seems to be slow. In fact a study by searchmetrics in 2014 found that only 0.03% of domains tested had integration.

THIS IS A GOOD THING! It means that you can easily get ahead of your competitors instead of always playing catch-up.

Don’t just take my word for it. The SEO experts over at Moz agree…

If someone told you that there was a quick and easy way that many of you could improve your SERP CTR for minimal effort, you’d all stop in your tracks and give them full attention. Yet, and rich snippets are still horribly under-utilized. and rich snippets

Let’s have a look at how the search engines are using data today. The most visible examples are reviews. Search for “cube agree gtc reviews” (it’s a bike) in Google and you’ll get something like this:

Search results page for bike review

See all of those stars? These are what’s known as “rich snippets”. That content is being pulled from data. How do I know? Let’s have a look at the code.

The top result is from (a site I worked on). If we click on that link and inspect the code we can see this:

Cycling weekly review code

Can you see the itemtype=""? That’s the markup that has been added to give context to the content. The rating itself is defined by the meta tags below, also with markup.

Let’s look at the BikeRadar code (the third search result) to see if they are using it too.

Bike Radar review code

Yep! There it is again. I don’t think there’s any coincidence that these two websites are at the top of the search rankings. Don’t get me wrong, there are other factors at play, but clearly Google is making use of this data to provide relevant search results.

I’m sure you don’t all have review based websites, so let’s look at another example. Here are the top search results for “Kawehi tickets”:

Search results for Kawehi tickets

Google knows the date, and venue of the next three events near me. Again, these sites are using markup.

Reviews and events are just two common uses. Some of the other prominent uses are:

I bet some of you are thinking “none of those apply to my business”. You might be right, but there are other ‘properties’ that you can use.


You can add markup that explains your business. This is perfect for smaller local businesses, or local branches of larger organisations. Some of the data that you can pass include (but not limited to):

Blog and BlogPosting

If you’re using WordPress there’s a good chance you have a blog on your website. provides Blog and BlogPosting properties that you can use to add structured data to your posts. You can add:

  • Headline
  • Text
  • Date published
  • Author
  • and a lot more

Adding markup to your WordPress website

Because markup is so closely integrated with your site content and code, it’s not always an easy addition to your site.

There seem to be some plugins that claim to help,, but I don’t have any experience with those, and I’d question how exactly they can know where that data is within your theme code.

Another option is themes with baked in. These are most commonly directory style themes.

Finally you could ask your developer to add some schema markup to your theme where you think it will be appropriate and useful. It actually doesn’t take long to add the appropriate markup, so shouldn’t be too costly, and it will avoid having to add yet another plugin. markup for a blog post

Let’s have a look at one of the most useful implementations of markup – blog posts.

If you visit you’ll see a long list of potential properties to add. I’m going to focus on the basics here, you can always add more depending on your content.

The first thing to do is to define the scope of your blog post as a ‘BlogPosting’. Your post might start like this:

<article itemscope itemtype="">

Now let’s start adding some of the basic properties. Firstly, let’s add the ‘headline’. You can do so like this:

<h1 itemprop="headline"><?php the_title(); ?></h1>

Next we’ll add some of the post meta data, starting with the published date.

<time pubdate itemprop="datePublished" datetime="<?php the_time( 'c' ); ?>" content="<?php the_time( 'c' ); ?>">

<?php the_time( get_option( 'date_format' ) ); ?>


We could add more microdata here, like ‘pubdate’, but I’ve left that out for the sake of simplicity.

Tags and categories can also be given the treatment:

<div>Categories: <span itemprop="about"><?php the_category(', '); ?></span></div>
<div>Tags: <span itemprop="keywords"><?php the_tags(''); ?></span></div>

We can also mark up the author information. Google has recently removed it’s ‘authorship’ rich snippets, but this data could still be used in the future.

<div itemprop="author" itemscope itemtype=""><img itemprop="image" src="<?php echo get_avatar_url( get_avatar( get_the_author_meta( 'ID' ), 150 ) ); ?>" />
<span itemprop="name"><?php the_author();?></span>

I’ve used a custom function to get the author avatar URL. The code is from this WordPress Development question.

The last bit of markup that we’ll add for now is the actual content of the blog post. This one is easy:

<div itemprop="text"><?php the_content(); ?></div>

The complete code would look something like this:

<article itemscope itemtype="">
<h1 itemprop="headline"><?php the_title(); ?></h1>
<time pubdate itemprop="datePublished" datetime="<?php the_time( 'c' ); ?>" content="<?php the_time( 'c' ); ?>">
<?php the_time( get_option( 'date_format' ) ); ?>

<div>Categories: <span itemprop="about"><?php the_category(', '); ?></span></div>
<div>Tags: <span itemprop="keywords"><?php the_tags(''); ?></span></div>

<div itemprop="author" itemscope itemtype="">
<img itemprop="image" src="<?php echo get_avatar_url( get_avatar( get_the_author_meta( 'ID' ), 150 ) ); ?>" />
<span itemprop="name"><?php the_author();?></span>


<div itemprop="text">
<?php the_content(); ?>


Does your site already use

If you’re wondering if your theme already has (or other structured data) this is a brilliant tool:

Closing thoughts

In my opinion structured data, including is going to become more and more important. As the internet gets bigger search engines will have more content to sift through, and will have to deliver it in new ways. If your content is well structured, you’ll be at an advantage over your competition.

If you have any questions about markup I’d love to hear from you.


Useful links

How to test your WordPress website performance

Website speed matters. Nobody likes browsing a slow website. If your site is slow, your visitors are more likely to leave and go to a competitor’s website.

It’s not just your users who like speedy websites, Google does too.

Today I recorded a video showing you two ways to test your website performance. Both methods use free, online tools and are really fast and easy to use.

Did you test your site? How did it do? Let me know in the comments, or email me at

Why I need a project manager

There comes a time in a small business’ growth that the owner’s management tasks take over the technical ones. When I started out about 80% of my time was spent building websites. As my business has grown I’ve had to deal with more support, administration, marketing, and project management. This has left less time for ‘doing the work’ (i.e. the billable stuff), but that’s just the way it goes.

The problem is that the jobs I’m having to deal with more and more, are the things that I’m not all that good at. I love designing and building websites. I also love talking to clients and helping them out when they need it. I even enjoy the marketing and sales side of things.

Why I need a manager

There are three business personalities; entrepreneurs, managers, and technicians. Between me and my team we have two of those covered. What we don’t have, and what I’m not built to be, is a manager.

There are things that I know I should be doing on a daily and weekly basis, that I’m just not getting done. I’m not good at routine. There are four main areas where I think I really need help: scheduling, planning, sales, and communication.


My biggest issue of all is scheduling. I find it really difficult to keep track of various projects, deadlines, budgets, etc. I’ve tried various tools to help, but the time commitment of keeping everything up-to-date has been too much. I’ve found that web development is almost too fluid to make these tools effective.


The next biggest issue, and it’s related to scheduling, is planning. Up until now I’ve been too reactive. I often let my inbox dictate my day’s work. I’d love to have a plan for the next day/week/month.


Better planning and scheduling would also help with sales. When a new prospect asks if I can get a job done by next month, I often struggle to know what our current workload actually is.


Finally, there’s communication. I want to be more responsive to my clients. In the future I’d like to be giving clients daily and weekly updates with progress, deadlines, and budget expectations.

Do freelance web project managers exist?

I did a quick Google search for ‘freelance web project manager’ and didn’t get a lot back. Does this magical person exist?

What I was thinking was having someone come in (not physically) for an hour or two a day to keep things ticking over. Would that work?

I’d love to hear from you

Are you also suffering from this? Are you a freelance project manager who can help? I’d love to hear from you. You can email me at, tweet me @keithdevon or reply in the comments.

SEO for WordPress

Do you want more traffic to your WordPress website? Are you new to SEO for WordPress ? Then start here.

You have a beautiful website, with great content, but where are all the visitors? A website is next to useless unless people can find it. How do they do that? Using search engines.

SEO, or search engine optimisation, is the practice of improving the ranking of your site in search engine results. Nearly every site can benefit from some slight enhancements to their SEO, and sometimes the smallest of changes can have big results.

SEO for WordPress

SEO for WordPress is actually quite easy at the basic level. Getting the basics right will put you ahead of most of your competition.

I’ve had SEO success with my personal website,, which ranks highly for key terms that my customers use. I’d like to share with you some of the methods that I’ve used, on that site, and others that I’ve built.

Is this guide for you?

This guide is primarily for WordPress website owners, although it may also be useful for developers who are new to SEO. If you’re already a SEO expert, this isn’t for you.

What this guide covers

No single guide could cover all aspects of WordPress SEO, it’s a huge and ever changing topic. This guide is an introduction to some of the key, on-site factors and the ways in which you can improve them.

We’ll cover:

  1. URLs
  2. Site titles
  3. Descriptions
  4. Images
  5. Sitemaps
  6. Breadcrumbs
  7. Headings
  8. Speed
  9. Microdata
  10. Tools and resources

Get the guide

Enter your email address in the form below and I’ll send you your free copy of “WordPress SEO: 10 tips for better search rankings”.

Conversion optimisation: 11 tips to encourage user action

You’ve built your website, you’re managing to drive traffic to it through good SEO, but is it providing a good return on investment?

It’s important to think about the purpose of your website. What is the main business goal that you’re trying to achieve? The most common answer is to generate leads, to drive more sales. Assuming that’s the case, is your website effective at this? How many website visitors do you need to generate a single lead?

A case study

Imagine you’re a dentist and you’ve calculated that every customer has a lifetime value of £5,000. You also know that it takes 10 leads to convert into one customer. That means every new lead is worth £500 to your business.

Now imagine that your website is getting 800 visits per month. Of those 800 visitors, maybe 20 people get in touch. That’s a 2.5% conversion rate. Your website would be generating £10,000 (20 x £500) of new business per month.

What if, using conversion optimisation best practices, you could increase that conversion rate to 5%. It still doesn’t sound like a lot, but you would be generating an additional £10,000 of revenue per month.

Hopefully this demonstrates the power, and value, of conversion optimisation. Now for the advice.

Conversion optimisation tips

1. Design matters

People judge books by their covers. Good visual design will set you above the competition and portray you as a professional, trust-worthy company.

2. Don’t reinvent the wheel

Many website owners make the mistake of trying to be too clever with their website. This often happens with website navigation, where people think it’s a good idea to have fun menus, where the user has to explore. Everyone loves exploring, right? Wrong! This is a very bad idea.

The most important thing that you can do is to help your users find the content that they want to find – quickly and easily.

Keep to web standards such as:

  • navigation at the top or left of the screen
  • use words, not pictures, for main site navigation
  • utility links (login, shopping cart, etc.) in the top-right of the page
  • contact link/information in the footer

3. Visual hierarchy

Make important things stand out on the page. You can do this using size, colour, positioning and space. However, make sure that only a few things are tying to grab attention – if everything is standing out, then nothing is.

4. Be user focused

Another common mistake is that websites are too focused on the business, and not on the users (I’m guilty of this and will be changing it with my next redesign).

It’s not about you. Your site should be focused on the user and what you can offer the user – the benefits that you give to them.

5. Relevancy

It’s easier to convert users that are actually interested in your product. Focus on driving quality, relevant traffic to your website and watch your conversion rate go up (and marketing spend go down).

Once you get the right people to your site make your content relevant. One way to do this is by using landing pages tailored to specific keywords

6. Don’t sell too fast

Most people don’t buy in their first visit, so don’t try to force the sale. People need time to make a decision. Give them the information that they need.

Don’t let them get away though! Collect email addresses is you can and market to them using email campaigns.

7. Clarity

People won’t buy what they don’t understand. Be clear – not fancy, funny, technical or smart. Use language that people understand, not industry jargon.

Use clear call to actions (CTAs). These are the buttons and links that encourage people to ‘Buy now’ or ‘Subscribe here’. Make it obvious what clicking the button will do, and why they should do it.

8. Reduce friction

The vast majority of visitors to your site won’t interact with it. Often they’re not ready, but sometimes things get in the way. This is called friction.

Friction can come from doubts, hesitations, and perceived risks about:

  • trust
  • quality
  • benefits
  • value
  • time pressure

Reduce friction by:

  • shortening forms
  • building trust using expertise, social proof, security credentials
  • clearing showing the value of your product/service

9. Eliminate distraction

Similar to reducing friction is the idea of eliminating distraction. Many websites try to display all of their offerings at once. Some offer many variations of the same product/service. This can lead to choice paralysis. Make it easy for users to choose a product, and don’t distract them with other offers (until the appropriate moment).

This is key for checkout pages, where there should be the bare minimum of distractions. Some websites even remove the main navigation at this point.

10. Urgency

One way to increase conversions is to create a sense of urgency. Be wary though, people can spot false urgency a mile off, so use this technique with caution.

There are three main types of urgency:

  1. Quantity – “Only 4 left in stock”
  2. Time – “Buy today – Offer ends Monday”
  3. Contextual – “Buy now for Christmas”

11. Testing, tracking and iteration

The number one bit of advice for conversion optimisation is to test ideas, track their performance and iterate – over and over again.

There are many web analytics tools out there that allow you to test your conversion rates. The best free one is Google Analytics. This will allow you to set up goals and experiments, so that you can compare two, or more, versions of a web page to see which performs the best.

You can test:

  • headlines
  • body text
  • call to actions
  • colours
  • images
  • layout
  • content order
  • and just about anything else that you can think of


Conversion optimisation is a huge topic, and this article barely scratches the surface, but hopefully you’ve been convinced of the power of these techniques, and are ready to try some yourself.

Choose an idea, implement it, test it, choose the winner, and profit.

I’d love to hear how you get on. Email me at to share your story.


Allowing null search with Relevanssi

I love the Relevanssi plugin for WordPress. It’s an easy way to power up the, frankly lame, native WordPress search.

By default the plugin will return no search results if no search term is given. Makes sense. But what if you are searching by other criteria too, and want to allow the search term input to be empty?

I’m building a custom job search for a client. There will be a ‘Search jobs’ form in the sidebar and the user will be able to search by term and region. The region is a taxonomy which the user selects from a drop-down. The form looks like this:


Screen Shot 2014-10-07 at 10.17.10


You have to tell Relevanssi to listen for the region query. Here’s how:

That works great if you enter a search term and a region. Yay! But it still doesn’t allow an empty search term. With some help from Mikko, the plugin author, I got it working. Here’s the code to fix it (and the actual form code I used):



Using variables with WordPress translation functions

Today I wanted to be able to pass a custom field variable to the WordPress localization (l10n) functions. The custom field is a select field, so all the possible outputs are known.

WordPress uses PO and MO files for translations. These are generated by scanning the site for __() and _e() functions, with a programme such as Poedit, to generate the list of translatable strings.

Using variables in these functions, like _e($output, 'text-domain'), causes a problem. When the scan is done, there is no string to add to the PO file.

In my case, because the outputs are known, I created a file called manual-translations.php, included it from my functions.php file and added the translatable strings like:

__( 'String one', 'text-domain' );
__( 'Second string', 'text-domain' );
__( 'Stringy cheese', 'text-domain' );

Now when the site is scanned it picks these up and I can now add the translations in Poedit.

Hope that helps someone out there!