wp_editor in metabox not working

So, I’ve created a meta box within my page to allow my client to be able to add content into multiple different content blocks dynamically. I’ve done that using the wp_editor function like so.

function what_we_believe_meta($post, $args) {
  $what_we_believe = get_post_meta($post->ID, 'what_we_believe', true);
  echo '</br>';
  wp_editor( $what_we_believe, 'what_we_believe');
}

The problem that I’m running into right now is this. In the backend of my site, the wp_editor shows up just fine and I’m able to save and call the content on the front end, all like a charm. But, when you click the tab to make it a visual editor, it makes the metabox go totally wonky.

Right now, the only way to fix it and make it go back to normal is to switch the main editor into text mode and refresh the page.

I’m assuming there’s a problem with the JS somewhere in here, but I could be wrong. Does anyone know how to fix this?

Thanks,
Jesse

0

Leave a Comment