0

I want to get content of a post until the read more that I set when I'm creating a new post, so far I'm able to get the content doing

apply_filters('the_content', $post->post_content);

I would like to get only until the Read More, I'm integrating a blog to the home page and I only need a brief description of the article.

Thanks

General Electric
  • 1,176
  • 3
  • 21
  • 44

1 Answers1

1

This is a function in the WordPress codex that does that, hope it helps.

<?php
$content = get_the_content('Read more');
print $content;
?>
Giacomo1968
  • 25,759
  • 11
  • 71
  • 103
epicallan
  • 66
  • 1
  • 5