Changing your WordPress site language (locale) dynamically

There are some fantastic multilingual plugins for WordPress, and WPML is one of my favourites. However for one client project I needed something far more flexible, as this particular client needed to cater for several countries that each spoke several languages. In short the client needed to be able to have a multisite instance that …

Enforce Version Control in WordPress to Boost Security

If you have spent a long time working on your clients website, ensuring everything is in version control (such as git). Then you would be pretty gutted if your client edits a theme file, or adds a new plugin that lives outside of your version controlled workflow. Adding code that lives outside of a tightly controlled workflow means: …

Stop Clickjacking by preventing your WordPress site loading in a Frame

Clickjacking is a potential security risk caused by someone loading your website in a frame on their domain, and hijacking interactions you make with that site. For example if your website requires a user to login, it could log the username and passwords of users targeted by the clickjacking attack. Fortunately preventing clickjacking in WordPress …

Custom conditional statements around your WordPress enqueued stylesheets

You may be aware that you can add conditional statements around your WordPress enqueued CSS styles (such as <!–[if gt IE 7]><link …/><![endif]–>) to load the script for certain versions of Internet Explorer. As handy as this is, it doesn’t cater for all situations. This tutorial will show you how you can expand WordPress to add any type …

Prevent users from sharing login credentials in WordPress

As any Information Governance expert will tell you, sharing usernames and passwords is bad! Fortunately we can boost your WordPress security with this tip. Although nothing is as good as educating your users as to why they shouldn’t be sharing their usernames and passwords, in WordPress we can certainly make it difficult for them to do …

How to add items to robots.txt with WordPress

If you wasn’t aware, WordPress auto-generates its own robots.txt file, and that there is a filter that you can hook into to allow you to add your own rules to the file. The filter in question is robots_txt filter. Using this information I hand crafted this handy little snippet: So there you go, a short, but handy little blog …

Contributing to WordPress Core for Absolute Beginners

This blog post details my first experience of contributing to WordPress Core, and hopefully it will provide a little help for any other budding contributors. Where to Start The WordPress.org website has a fantastic section for contributors, the section I was looking for in particular was the Make WordPress Core area of the website. It was here that …

Creating a Custom CMB2 Link Picker Control for WordPress

In this tutorial I will look at how you can create a custom control to extend the functionality of CMB2 (Custom Meta Boxes 2) by WebDevStudios. I develop websites (and web applications) with the WordPress CMS (Content Management System), and when a new project lands you can guarantee that there will be a requirement for me to develop ‘Custom …