Answer the question
In order to leave comments, you need to log in
How to format the Extended part of a post?
Good afternoon, dear ones.
Faced the following problem:
If you display the content of the post through the_content();
then everything is in order, all html tags are present. But my task is to split the post into text before more and after. Accordingly, I use the get_extended() function. But when I try to display what's after more, the text is solid, without tags (even p).
I do it like this:
global $post;
$post_parts = get_extended($post->post_content);
echo $post_parts['extended'];
<p>Первая строка</p>
<p>Вторая строка</p>
Первая строка Вторая строка
Answer the question
In order to leave comments, you need to log in
Try
using instead
echo apply_filters( 'the_content', $post_parts['extended'] );
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question