So I’m working on a small project and I ran into a task involving a form with a file input that has to update an image attached to a custom post type. It got pretty interesting because it took a bit of digging to get it to work. While there was not a lot of […]
Category Archives: JavaScript
JavaScript is considered to be the “language” of the web. It is one of the most expressive object oriented and functional programming available to date. These posts contain topics about JavaScript.
Adding Google reCaptcha to our Next.js Comments Form
In my last post, we’ve added the comments area to our single post page. This included the comments list, along with the comments form. Remember we’re still working with the framework Next.js and WordPress REST API. But what good is a form if all we get is junk? What is stopping bots from spamming our […]
Easy Comments Area for the Single page – using Next.js
Now that we’ve got our basic single component (named [slug].js), which displays a single post, let’s look at how easy it is to add the comments area. First, let’s build 2 components: 1) CommentList.js and 2) CommentForm.js. In Next.js, when creating components that doesn’t use a route – we place them in the “components” directory. […]
Coding the Single Post component with Next.js
Still working with Next.js and WordPress here – as described in my previous post. I’m at the single post now, and as it turned out – it’s really easy to build the basic functionality. So in Next.js – you simply add a component in the “Pages” directory to “route” the requests. For dynamic routes – […]
Building a Headless CMS with Next.js and WordPress
Say what? Why would I want to use Next.js for the front end for a WordPress website? I’ve already covered a couple of ways to do a single site WordPress – using React or Vue that work just fine. Why “headless”? Why complicate things? Believe it or not, there are plenty of reasons to use […]
Let’s build a WordPress theme with React: Part 3 (The Loop)
Okay its been a while since I last posted. Let’s continue with Barebones React WP theme. The last time we left off, we introduced the concept of “The Loop“. But we really didn’t get into what its all about. Let’s describe what this piece is doing. In WordPress themes – there is the “The Loop“, […]