Steve Fenton


You can subscribe to the php tag micro-feed.

WordPress custom query page size

WordPress normally takes care of queries for you. When it doesn’t, your next port of call is normally WP_Query. After that, you head into nuts-and-bolts mode with a completely custom query using get_posts. When you start taking control over queries, you may hit this common problem with page size. Here is an example of custom […]

Useful Apache mod rewrite rules

I recently migrated my website to a different platform. I anticipated that this would require some redirection rules to send people to the correct content on the new website, but I failed to anticipate that number of links to legacy files (like some jQuery plugins and their static HTML example pages). As a result, I […]

Custom tasks in Visual Studio Code

I was asked how to create a custom task in Visual Studio Code. It comes with a bunch of built-in tasks that you can add to the tasks.json file – but what if you need something else… The example below enables PHPLint (in a not-very-sophisticated way) – but the technique would work for anything you […]

Writing a mobile app using HTML5

Everyone is keen on writing apps these days. For an organisation, apps are the buzz. For consumers, apps are the convenience. The only problem is that writing apps that target every operating system (and then every version of an operating system that has a wide distribution between versions) can be quite a task. This is […]

Dependency injection in PHP

Dependency Injection solves the problem of dependencies in complex applications. Because we want to re-use our code rather than duplicate it in many places, we end up with more dependencies in our code, but Dependency Injection can ease the pain of dependencies and also make your code easier to test. One of the most popular […]