I was writing my own plugin that uses the_editor(). I have found wp_editor() too, however they both function the same in this regard. If a user enters a post (from inside my plugin) with a read more tag, it works fine. However, when accessing the post again inside my plugin, the read-more tag is lost. Instead, in html view it is displayed as this:
<span id="more-38"></span>. It is completely lost in visual mode and disappears from the html view if you flip between the two views.
Here’s what I think is the essential code in the plugin that calls the content and places it into the editor.
<?php global $more; // Declare global $more (before the loop). ?> <?php $more = 1; // Set (inside the loop) to display all content, including text below more. ?> <?php $content = get_the_content(); wp_enqueue_script(array('jquery', 'editor', 'thickbox', 'media-upload')); wp_enqueue_style('thickbox'); ?> <?php the_editor($content);?>
- The topic ‘the_editor($content) and wp_editor($content) not displaying read more tags’ is closed to new replies.