Allow users to create post without logging in?

the easiest way is to use this plugin: http://wordpress.org/plugins/guest-posts/ Offer your blog guests or unregistered blog readers an opportunity to post on your WordPress blog without registering themselves. Guest Posts will help you to create a strong interaction and engagement with your blog readers. This plugin will create a form where your guests can submit … Read more

How to set a cookie for logged in users to md5($user->ID . “my_secret”)?

Nevermind, I’ve figured it out: function init() { $user = wp_get_current_user(); if (!$user instanceof WP_User) return; $year = time() + 60 * 60 * 24 * 30 * 12; $auth = md5(join(‘_’, array($user->ID, “my secret”))); setcookie(‘visitor_id’, $user->ID, $year, “https://wordpress.stackexchange.com/”); setcookie(‘visitor_auth’, $auth, $year, “https://wordpress.stackexchange.com/”); } add_action(‘init’, ‘init’);

Rest API basic auth not working

The REST API does not support basic authentication out of the box, you need a plugin. The documentation points to this one, accompanied by this warning: Note that this plugin requires sending your username and password with every request, and should only be used for development and testing i.e. not in a production environment.

PHP: authenticate for a REST request?

What do you mean by “external users”? If you only want Users, that are logged into your website, to use the API Endpoint, you can filter the “rest_authentication_errors” like described here Add this to your plugin: add_filter( ‘rest_authentication_errors’, function( $result ) { if ( ! empty( $result ) ) { return $result; } if ( … Read more