From the course: WordPress: Advanced Custom Fields

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Coding a front-end submission form

Coding a front-end submission form - WordPress Tutorial

From the course: WordPress: Advanced Custom Fields

Start my 1-month free trial

Coding a front-end submission form

- [Instructor] Advanced custom fields let's us take user interaction to the next level, by creating front end submission forms. This allows users to fill out a form and have it submitted as a post or any post type in WordPress. You can also choose to have it publish automatically or have it set as a draft for review. Let's take a look at how to do that. First we'll need to create a page template for our form. We can do that by copying from two files in our parent theme. The first is page.php we're going to copy that, and then paste it into our child theme. We'll rename that to page-new-profile. Then we'll delete the entire comment block starting on line two. We'll replace that with a single line comment called Template Name: User Profile. This will tell WordPress to use this file as a page template. Next, we'll add a new line right above our get_header function call. And that's going to be acf_form_head. This will tell advanced custom fields to include everything we need to submit a…

Contents