php - The wordpress Read More doesn't work, it displays the full content

840

I'm trying to display some post by ID in WordPress. My problem is that when I display the content (not with the_content()) the read more tag doesn't word, it displays the full content.

I didn't use the loop and the the_content function, i tried this way:

echo get_post_field('post_content', $id);

Is there any way to display with this method?

189

Answer

Solution:

echo apply_filters('the_content', get_post_field('post_content', $id));

People are also looking for solutions to the problem: php - Issue in ajax function with file data

Source

Didn't find the answer?

Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.

Ask a Question

Write quick answer

Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.

Similar questions

Find the answer in similar questions on our website.