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“, […]
Tag Archives: WordPress
Let’s build a WordPress theme with React: Part 2 (Routes + Context)
Now that we have our react app setup, let’s form how our application will be structured. We’re going to need 3 main folders: 1) templates, 2) partials and 3) context. These are all going to be inside react-src/src folder. The templates folder is where we’re going to store the main files template files – namely […]
Let’s build a WordPress theme with React: Part 1 (Setup)
It’s been a while since I worked with WordPress, especially building themes. This time around, I wanted to bring in a bit more modern development experience into the process. I wanted to build a Single Page Application (SPA), with WordPress’ Rest API – but as a WordPress theme. The problem is, this can be a […]
Show number of posts out of total records in WordPress
From time to time, I just look at my blogs and see what I can add to it to make it more appealing to the user. I’ve always admired those sites that tell you what number of posts a certain category has, and what number of posts it is currently showing. So I set out […]
Add an additional Body Class to WordPress by using the Post Slug
One of the real useful things I’ve come across with WordPress is the body_class() method. This adds several classes to the body element of your HTML. The output looks something like below: Why is this so great? Now you can style your pages very efficiently because you’re able to select from the template you’re using, […]
Create a Testimonials section for your WordPress site – the Right Way!
I was recently given the task of updating the testimonials section of our company WordPress site. Imagine my disappointment to see a static page with a running list of paragraphs and author names. I said to myself, we can do way better. Let’s take a glimpse of what we’re going to be building: We will […]