1

I was wondering if it is possible to allow my users to create posts from the front end in an inline editor, similar to content creation on Medium.com? I know there are many options out there for inline editing, but not any for end users to post from the front-end that I'm aware of.

Currently I am using Gravity Forms which allows my users to create posts from the front-end, but it is through a form and not inline. Is there a way to do this so that a post is created after submitting some sort of inline form? Any assistance with this would be really appreciated since I am kind of lost.

  • 1
    Whats ur exact question? do u want to someone code it for u? – Pmpr Dec 22 '15 at 1:51
0

Use the WP JSON REST API in conjunction with jQuery.ajax(). It works pretty well with custom endpoints. Just be sure to use nonces.

<?php
add_action( 'rest_api_init', function () {
    register_rest_route( 'myplugin/v1', '/author/(?P<id>\d+)', array(
        'methods' => 'GET',
        'callback' => 'my_awesome_func',
    ) );
} );

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.