0

I've build myself a custom page template. Within this template I'm using the wp_editor() function. Sadly, when I logout now from my wp site and go now to the page I want to see, I'm getting an error in my console:

Uncaught ReferenceError: tinymce is not defined

When I log back in, everything works quite fine. I've also tried to enqueue the editor script if a user isn't logged in this way:

if ( ! is_user_logged_in() ) {
    wp_enqueue_script( 'wp-tinymce' );
}

But this don't solved my issue. I've cleaned the cache every time and restarted the server.

So does anyone has an idea how I can get the wp_editor() function runnning with non-logged-in users?

Your Answer

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

Browse other questions tagged or ask your own question.