O'Reilly logo

WordPress Plugin Development Cookbook by Yannick Lefebvre

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

Creating a client-side content submission form

The first step towards giving visitors the ability to contribute to a site is to present a form that they will be able to use to submit new content. This recipe shows how to create a shortcode that can easily be inserted on any WordPress page to render a simple form.

Getting ready

You should be running the final version of the Book Reviews plugin created in Chapter 4, The Power of Custom Post Types.

How to do it...

  1. Navigate to the WordPress plugin directory of your development installation.
  2. Create a new directory called ch6-book-review-user-submission and open it.
  3. Create a text file called ch6-book-review-user-submission.php.
  4. Open the new file in a code editor and add an appropriate header at the top of ...

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