• Hello,
    i’m having a harder time than I thought to find information on creating a front end crud flow on wordpress.

    I managed to get the create, read, delete part, but not the update part.

    I don’t want to rely on a plugin, and I need to be able to:

    – Populate a form of a complex previously created record with all kind of custom fields such as multi images fields.
    – Update the corresponding record.

    What would be the proper way to do this?

    • This topic was modified 4 years, 7 months ago by Jan Dembowski. Reason: Moved to Fixing WordPress, this is not an Developing with WordPress topic
Viewing 3 replies - 1 through 3 (of 3 total)
  • Are you talking about using WordPress’s API system to perform CRUD on your frontend?

    
    fetch('https://wordpress.dev/wp-json/wp/v2/posts/',{
        method: "POST",
        headers:{
            'Content-Type': 'application/json',
            'accept': 'application/json',
            'Authorization': 'Bearer '+user.token
        },
        body:JSON.stringify({
            title: 'Lorem ipsum dolor sit amet - updated',
            content: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. - updated',
            status: 'draft'
        })
    }).then(function(response){
        return response.json();
    }).then(function(post){
        console.log(post);
    });
    
    Thread Starter CharlesDerre

    (@brakkar)

    No no sorry for confusion: when I say frontend I mean out of the admin, but still with php / html.

    Have a look at the WP Data Access plugin. Maybe you’ll find what you’re looking for at
    https://wpdataaccess.com/

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Front end CRUD forms operations’ is closed to new replies.