Chapter 5

Creating Simple Plugins from Scratch

IN THIS CHAPTER

Check Creating a valid plugin

Check Filtering content

Check Adding shortcodes and widgets

Check Creating a plugin settings page

You can extend WordPress functionality through plugins and themes without modifying any of WordPress core files. This technique allows you to customize WordPress and permits easy upgrades when new versions of WordPress are released. By using the WordPress software built-in action hooks (placeholder functions that allow plugin developers to execute code hooked into them) and filter hooks (also placeholder functions that you can use to apply parameters to filter results), you can create just about any functionality you can imagine.

This chapter takes you on a crash course in creating plugins. The plugins I show you how to build start simple and iteratively introduce new concepts as the functionality gets deeper and more involved. Having a foundational knowledge of PHP is helpful for getting the most out of this chapter, but even beginner PHP developers should be able to get value out of each project.

This book doesn’t ...

Get WordPress All-In-One For Dummies, 4th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.