Answer the question
In order to leave comments, you need to log in
Why is the content not visible to unauthorized users?
Hello, on the site, text pages do not display content if you are not authorized, only the header, crumbs and footer. Exactly what is output by the <?php the_content(); ?>
Page Template
<?php get_header(); ?>
<?php get_template_part( "template-parts/betcrams" ); ?>
<div class="sreen-content">
<div class="container 1">
<?php the_content(); ?>
</div>
</div>
<?php get_footer(); ?>
Answer the question
In order to leave comments, you need to log in
You need to check with have_posts()
, and then call the_post()
. After that it will work.
<?php if (have_posts()) {
the_post();
?>
<div class="sreen-content">
<div class="container 1">
<?php the_content(); ?>
</div>
</div>
<?php } ?>
Yes, thanks. It helped, tell me, if it’s not difficult, what is the reason for the inoperability of my code, because I don’t see any signs of an authorization check here.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question