Toolbox of the Smart WordPress Developer: GenerateWP
Welcome to the third part of the "Toolbox of the Smart WordPress Developer" series. In this part, we're going to go through GenerateWP, a website dedicated to building WordPress code.
Is Writing WordPress Code Hard?
Before you let your blood boil with anger, ask yourself this question: Have you ever made a mistake while you were learning coding in WordPress?
I know I have. 'Twas a cold night in Kocaeli, Turkey (my hometown, right next to İstanbul) when I saw my first White Screen of Death (WSOD). The year was 2006 and I was editing a free WordPress theme for my blog, Beyn. I was also new to PHP, MySQL, HTML and CSS, so you can imagine the horror when I saw that I couldn't open any page—including the admin panel, if I'm not mistaken. After minutes of terror and a few drops of cold sweat on my forehead, I finally thought of deleting the theme from FTP and starting anew with the unedited theme files. I managed to locate the problem in my
index.php file—you guessed it: a missing semicolon.
Let me answer the question one more time: Yes, writing WordPress code is hard for WordPress beginners. Actually, all WordPress developers might benefit from GenerateWP, no matter how well they know WordPress.
I'll tell you why.
Enter GenerateWP: A Website to Teach WordPress Code
If GenerateWP had existed back in 2006, I would have learned WordPress way faster.
GenerateWP defines itself as "The easiest and the fastest way to create custom and high quality code for your WordPress project using the latest WordPress coding standards and API's", according to the GenerateWP.com homepage. It's a really fun way to build WordPress code without any hassle.
But it's more than that. By its nature, GenerateWP also teaches people how to code in WordPress. When you select a tool and build your code, you see what your settings actually affect in the code, and that gives you an idea of how the code works. And this isn't only for WordPress beginners—even WordPress veterans can benefit from it. After all, being good at WordPress coding does not mean memorizing every single bit of code in the core of WordPress.
Is GenerateWP Bad for WordPress Beginners?
I like to think that GenerateWP serves the purpose of being a hands-on training exercise for WordPress beginners. Why? Simply because it shows users how the code is built. Experimenting with the tools for a couple of times, one can learn how the code is generated, what the arguments are, how the arguments work, and how the code changes if the tool is used with different values. A smart WordPress beginner would have fun and experiment with the tools, then try to type the code by himself or herself for the first time. The rest would turn the beginner into a veteran, or in cool terms, a WordPress ninja!
But, of course, some people like to take the easy way out and use the tool every day. It's still not bad when those people release their code for the community (because the code will be well-written, thanks to GenerateWP), but they will never understand that after a certain point, using the tool is slower than coding by hand.
The Tools of WordPress
As I'm writing this article, GenerateWP has 20 easy-to-use tools, and a section where you can store your custom code snippets (which we'll get to in a little while). Let's see what the tools are:
- With the Taxonomy Generator, you can create custom taxonomies.
- With the Post Type Generator, you can create custom post types.
- With the Post Status Generator, you can create post statuses.
- With the Theme Support Generator, you can create custom theme features like language support, content width and featured images.
- With the Sidebar Generator, you can create custom "dynamic sidebars" to hold widgets.
- With the Menu Generator, you can register custom navigation menus.
- With the Shortcodes Generator, you can create WordPress shortcodes.
- With the Quicktags Generator, you can create custom quicktags.
- With the Toolbar Generator, you can create Toolbar items.
- With the
WP_QueryGenerator, you can create WordPress queries.
- With the
WP_User_QueryGenerator, you can create WordPress user queries.
- With the
WP_Comment_QueryGenerator, you can create WordPress comment queries.
- With the
wp-config.phpFile Generator, you can create a custom
- With the Plugin Readme Generator, you can create your next plugin's
- With the Cron Job Event Generator, you can schedule custom Cron jobs.
- With the Register WordPress Scripts tool, you can register WordPress scripts.
- With the Register WordPress Styles tool, you can register WordPress styles.
- With the oEmbed Providers tool, you can create custom oEmbed providers.
- With the Theme Default Headers Generator, you can create custom header images for your theme. (Is there anyone actually using this WordPress feature, by the way?)
- With the User Contact Methods Generator, you can create new contact methods which can be changed from user profile pages.
All of these tools are really fun to play with, and as I said earlier, even WordPress veterans might—nay, will—benefit from these tools.
But even if you've memorized all the codes in the WordPress core and don't need any of those tools, you might enjoy the latest and newest section of GenerateWP: sharing snippets.
GenerateWP.com as a Custom Snippet Sharing Tool
When GenerateWP.com turned two at the beginning of 2015, its creator Rami Yushuvaev posted a celebration on GenerateWP's blog, and introduced a new tool called "custom snippets". With this tool, you can save your WordPress code snippets and share them with the world. You just have to register first. *sigh*
Under each GenerateWP tool, you see two buttons: "Update Code" and "Save Snippet". By clicking that second button, you can easily save the code you just built with GenerateWP. Better yet, you can also write code from scratch (instead of working with the tools) from the Custom WordPress Snippets homepage. Neat.
Wrapping Up for Today
GenerateWP is a WordPress tool that, for me, closes an important gap in hands-on WordPress training experience. With its tools, I'm sure that many WordPress beginners will speed up their learning processes for important APIs and functions of WordPress.
What's your take on GenerateWP? Tell us what you think by posting in the Comments section below. And if you liked the article, don't forget to share it with your friends!
See you in the next part where we'll be covering WP Quick Install, a tool to quickly install WordPress with lots of customization.
Source: Tuts Plus