Now let’s walk through and test our module. In doing so, you’ll find that we need to change the taxonomy’s registration as we don’t want to show it on the front-end. Let’s make that change. Then we’ll commit the final changes to your GitHub repository.
I have to say how proud I am of you! Seriously! You worked right along with me. I know it was a long lab. The whole point was to walk you through the entire process of building a new feature module, step-by-step. I hope you learned about WordPress, PHP, Plugins, HTML, and more. We covered a lot of topics in this lab. Pat yourself on the back as you did a wonderful job!WooHoo, I added a new feature module to an existing plugin in #WordPress Plugin Development A-Z Click To Tweet
You just completed Part 2 of this 5 part series. You now have a completed plugin, one that you can adapt and use in your projects. Plus, you learned how to approach and think about plugin development from start-to-finish.
This plugin is yours. Show it off in your portfolio. Use it in your business. Adapt for yourself. It’s yours. It’s a completed, fully-functional, and ready-to-deploy plugin.
You did an excellent job. Congratulations!
Whoops, error to fix
After shooting this video, I saw an error in the Archive FAQ template file. If there are no records, we render out a message. But I forgot to return and bail out of the function. Here is the change. Add this
return to your plugin too.
One of our jobs is to build quality code that is reusable again and again without changing the codebase. Ideally, we'd like to configure what's different and have the codebase the same for all of our projects. In Part 3, you will convert the Collapsible Content plugin into the ModularConfiguration design pattern by moving all runtime configurable parameters into configuration files Then the codebase will be made reusable. The actual implementation then is determined by the configuration file that's loaded. This approach will save you time.
Check out the Plugin Development Library for more hands-on labs, insights, Docx, and more.
Check out the series page for more labs: Collapsible Content Plugin Series – WordPress Plugin Development A-Z
Keep It Simple, Stupid (KISS) - the best kiss you'll get in code.
Total Lab Runtime: 05:11:56
- 1 Lab Introductionfree 07:51
- 2 Planning it Outfree 11:05
- 3 Module Architecturepro 17:12
- 4 Build the Basic FAQ Custom Post Typepro 06:04
- 5 Configuring the Custom Post Type Labelspro 18:33
- 6 Configuring the Custom Post Type Feature Supportspro 07:23
- 7 Configuring the Custom Post Type Optionspro 11:27
- 8 Flushing the Rewritespro 09:44
- 9 Planning the Taxonomypro 04:54
- 10 Build the Taxonomypro 05:33
- 11 Taxonomy Label Generatorpro 14:23
- 12 Flush Rewrite Rules - Taxonomypro 05:36
- 13 Architecting the Archive Pagepro 11:14
- 14 Serve Archive Template from the Pluginpro 10:41
- 15 Let Theme Override Our Archive Templatepro 21:29
- 16 Build the Archivepro 11:09
- 17 Build the Archive Viewspro 13:23
- 18 Set the Order Within the Topicpro 03:44
- 19 Review and Commit Changespro 02:34
- 20 Architect the Shortcodepro 15:23
- 21 Build the Shortcode - Single FAQpro 21:19
- 22 Fixing the Architecturepro 08:00
- 23 Define a WP_Query for Topicpro 16:10
- 24 Continue Building the Shortcodepro 11:39
- 25 Finish by Topic Shortcodepro 08:51
- 26 Planning the Refactorpro 08:01
- 27 Refactor FAQ Modulepro 19:58
- 28 Test, Fix, Commit, and Wrappro 08:36