Create page to handle form submission

This is actually really easy (at least #1 and #2 are):

  1. You can use any URL that loads a theme template file. For example, you could create a WordPress Page and in your Page Template you can use PHP’s $_POST array to capture your <form> values.

  2. Unless you’ve got a good reason, you really don’t need to do a redirect. You can, but I don’t see that you need to and it just makes your task more complicated. If you really want to this answer will show you how.

  3. I’m confused by what you are trying to accomplish with your “shops/%product%” URL. At first blush your choice of “shops” for a custom post type and “products” for a taxonomy seems wrong to me (unless you are trying to represent many different shops; i.e. if your site is trying to be a marketplace for many different merchants. Is that the case? Even then, I still don’t see why you’d use a taxonomy for your products.) So it seems to me you’d instead want to create a custom post type of “Product” (though I’m not sure about the taxonomy), and then you’ll get URLs of the type products/%product% when you register you custom post type. Or maybe I misunderstand what you are trying to do for #3?

Leave a Comment