Is there a difference in usage of the_title() and the_content()

Question

I try to learn some basics about WP so I pasted the following code into a WP page where I use a plug-in that allows me to write PHP.

It works for the_title (twice), but when I put the_content inbetween, the page hangs with no output. I must comment the_content to make the page print the_title (twice). Different efforts give the same result: the_content() hangs the page but not the_title().

What do I do wrong using the_content.

Sorry that I have not got the formatting perfect.
br1 are break tags enclosed in tags to stop php interpretation

$args = array(
‘post_type’ => ‘post’
);

$post_query = new WP_Query($args);

if($post_query->have_posts() ) {
while($post_query->have_posts() ) {
$post_query->the_post();
the_title();
br1
// the_content();
br1
the_title();
br1br1
}
}

0
cvr 4 months 2020-12-26T23:10:26-05:00 0 Answers 4 views 0

Leave an answer

Browse
Browse