How To Add JavaScript to WordPress

Adding JavaScript to an HTML page is straightforward: you add a script tag into the <head> section of the HTML code. But in WordPress, adding JavaScript is more complex, because you do not directly change the HTML templates. Instead you rely on a dedicated WordPress API for handling JavaScript code.

In this article, we will have an in-depth look at this fundamental API, and learn how to add JavaScript to WordPress.

Together we will:

Read More

PHP Security Basics: Input Validation

Validation is a technique to ensure that input is secure before using it in your code.

When validating data, you are verifying that it corresponds to what the program needs. This only works if you have a list of criteria that you can check to determine that the data is valid.

In this article, we’re going to look at:

Read More

Code Review Checklist

Code review has been an integral part of my career as a developer. Whether it in the beginning through reviewing themes for, reviewing client code at VIP, or now when reviewing code from peers as a Principal Engineer at Human Made.

Code review has both allowed me to learn and grow as an engineer, as well as teach and mentor other developers in return.

There is an ever growing number of issues that I look out for. This article is just a list of all these things, and the reference I use for reviews.

Read More

Shortcut to Gutenberg: How To Learn Gutenberg Development in 6 Days

So I published How To Learn Gutenberg Development, which outlines a roadmap for learning ES6, React, Redux, and Gutenberg. This is a proven, and sure way to master Gutenberg.

But this approach also takes time. In fact several readers have reached out to me expressing that they don’t have time for a long learning process.

With Gutenberg in Core, developers need to be productive with Gutenberg right now.

As a consequence I’ve reworked my initial learning approach, to fit with this short timeframe. The learning process outlined below takes 6 days, or 3 weekends, or 48 hours.

At the end of it, you’ll be able to:

  • Adapt existing WordPress themes to work with Gutenberg content.
  • Add Gutenberg specific features to themes.
  • Understand the basics of React.
  • Feel comfortable exploring Gutenberg’s user interface component library.
  • Develop custom Gutenberg blocks.
Read More