Answer the question
In order to leave comments, you need to log in
How to display the full text of an article when using the_excerpt?
I ask you not to swear in advance at the possible simplicity of the question, and I will warn you that I spent quite a lot of time looking for an answer so as not to litter the forum.
I am looking into creating themes for WP. I need to make a short "announcement" of the post with the "read more..." button, I googled this way:
In the post, in the "excerpt" field, I write my announcement, in index.php I put the_excerpt() and write the_permalink() to the link. In all guides, when you click on the link, the full text of the post opens, but when I click, the announcement continues to be displayed.
Tell me how to fix it? Or where to read about it?
Answer the question
In order to leave comments, you need to log in
Are you probably using index.php to display posts as well? If so, copy it to single.php and replace the_excerpt() with the_content().
Or, in index.php itself, do a split:
if( is_single() ) {
the_content();
} else {
the_excerpt();
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question