In today’s post, we will look at Bootstrap blog template and create React dumb components out of it. Nothing too fancy, just some copy pasting and refactoring. After completing the steps in the article, we’ll be ready to create the smart components, plug the dumb ones into them and have a working blog theme!
In the third installment of our “How to make a React-powered WP theme” tutorial, we create the starting point of our React-powered WordPress theme. I’ll show you what all we need to import in order to have a working application. We’ll also talk about how to properly divide the React components into smart and dumb ones.
In the second part of our tutorial, we’ll be talking about the theme’s initial folder/file structure, installing required Node packages, configuring Webpack and setting up a Node development server with hot reloading. I’ll show you how to properly bootstrap a Redux-powered WordPress theme. If you want to see how the project will look at the end of this article, look at its GitHub repository (branch
Undoubtedly, WordPress Core would benefit from a larger number of active developers. The system, especially Trac1, might be, however, too complicated for newcomers to work with. That goes for me too. Do you know what’s the best way to learn something? Write an article about it, of course. That’s what I’m going to do: write a post about what the Trac is, how to use it and so on. I’m going to use a lot of screenshots to accomplish the task with an ease.
Sass is awessome. Since our first date, I’ve been (ab)using her in all the projects. She gives you superhuman abilities, far beyond the reach of what classical CSS has to offer. Sadly, she can’t be found in many WordPress themes and I don’t understand why. Is she not hot enough for the majority of WordPress developers? Perhaps she too complicated for them. Luckily for you, my dear readers, I’ve lived with her long enough to experience all her quirks and me being a friendly fella, I’m going to share them with you.
Alright, enough fun, let’s get serious. Ever wondered how it’s possible that some front-end developers are that exceptionally fast and always smiling? In today’s article, I’m going to teach you their secret weapons. We’re going to talk about Sass, the most popular CSS preprocessor; what, why and how. Don’t worry too much, I assure you Sass is quite easy to understand and learn to use. If you have some CSS skills, you’ll find Sass straightforward to get hold of.
When meeting new developers, one of the first things they ask me is whether I use Git during a theme or a plugin development. “Yes, of course, I couldn’t imagine my life without it”. A few years ago, though, the answer would be a puzzled look followed by a feeling of inferiority and shame. Their efforts at explanation proved futile. Looking back, understanding Git is not that difficult. So here’s my very high-level explanation. Or an attempt, at least.
The most typical conversation (aside from which plugins to use) in the WordPress sphere is about the speed comparisons between various web serving software like Apache or Nginx. There are tens of articles with nice charts and big claims on the Internet: Nginx is faster than Apache. HHVM is faster than PHP-FPM and so on. The question is: can we trust them? What if the technology behaves differently on our VPS? The only way to be sure is to carry out the benchmarks ourselves. It is, however, time-consuming to install and configure the whole stack. I think I found a (partial) solution.
How to add post meta data before it has been saved or published? Can’t use transitional hooks. After digging through code, you have to use add_meta_boxes action.
Let’s say you have a custom post type book. Each book has several properties (meta data), such as the author, the publisher and the publication date. Now, WordPress has a nice feature called Custom Fields. It is an interface for adding meta data to your posts: a meta key on left and meta value on right. When a new book is created, however, Custom Fields are empty because no meta data has been added to the book yet. The question is: how can we add custom meta data to a post (book) before it has been saved as a draft or published?
Recently, I had to modify the default WordPress admin post editor (TinyMCE) configuration on a specific post type. I wanted to remove a few buttons, Quicktags, limit the number of rows and so on. At first, I was puzzled over which hook I should use. In the end, it turned out to be pretty easy to accomplish that.