0
내 새 WordPress 테마에서는 정적 인 첫 페이지와 블로그 게시물의 하위 페이지를 만들었지 만 문제는 표시되지 않습니다. 정적 전면 페이지없이 사용하면 게시물이 정상적으로 표시됩니다. 무엇이 잘못 될 수 있습니까? 이전Wordpress 게시물이 표시되지 않음
<?php
/*
Template Name: Blog page
*/
get_header();
?>
<!--parallax section 1-->
<div class="section-one">
<div class="parallax-section-1">
</div>
<div class="container-fluid">
<h1>News</h1>
</div>
</div>
<div class="container-fluid">
<?php if(have_posts()) : while (have_posts()) : the_post(); ?>
<div class="post">
<h1><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h1>
<h6>Posted on <?php the_time('F jS, Y'); ?> by <?php the_author_posts_link(); ?></h6>
<div class ="entry">
<?php the_content(); ?>
</div>
</div>
<?php
endwhile;
else:
?>
<p> Sorry, no posts to display.</p>
<?php endif; ?>
</div>
<?php get_footer(); ?>
는 설정 아래의 게시물 페이지> 읽기로 페이지를 설정 했는가 "경우"여기
블로그 페이지 내 코드? – Peter
네, 그랬습니다. 페이지가 표시됩니다. 게시물을 제외한 모든 메시지 – mheonyae
if를 제거하고 잠시 기다리십시오. 따라서 php while (have_posts()) : the_post();로 시작해야합니다. ?> 끝내고 php endwhile; ?> – Peter