A
A
Anatoly2018-06-14 16:57:26
WordPress
Anatoly, 2018-06-14 16:57:26

Why doesn't cropping an article with the_content() function in Wordpress work?

There is an article in the text of which is <!--more-->.
Next I output the_content(); but the text is not cut off, but also displays the <!--more-->
code:

global $more;
while ( have_posts() ) : the_post(); 
  $more = 0;
  the_content( '[more..]', true);
endwhile;

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anatoly, 2018-06-19
@Tolly

The problem was that it was necessary to write <!--more-->in the "Text" tab, and if you write in the "Visual" tab, the text will be replaced by&lt;!--more--&gt;

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question