O'Reilly logo

WordPress® All-in-One For Dummies® by Michael Torbert, Andrea Rennick, Kevin Palmer, Cory Miller, Lisa Sabin-Wilson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 5: Creating Simple WordPress Plugins from Scratch

In This Chapter

  • Creating a valid plugin
  • Filtering content
  • Adding shortcodes and widgets
  • Creating a plugin settings page

WordPress plugins are one of the greatest parts of WordPress. As open source software, a developer can extend WordPress functionality through plugins and themes, and WordPress provides a great API (Application Program Interface) to do so. Using WordPress's built-in action hooks and filter hooks, you can create just about any functionality you can imagine. In this chapter on creating simple plugins, we assume that you have basic PHP knowledge.

image This All-in-One doesn't turn you into a PHP programmer or MySQL database administrator; Book II, Chapter 3 gives you a glimpse of how PHP and MySQL work together to help WordPress build your Web site. If you're interested in finding out how to program PHP or become a MySQL database administrator, check out PHP and MySQL For Dummies by Janet Valade (Wiley).

image Often, WordPress users are tempted to edit the core code of WordPress rather than write a plugin to achieve the desired functionality. This isn't recommended because it makes upgrading difficult and can cause various problems, including serious security issues.

When writing a plugin, you can develop it by using ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required