나는 내 Wordpress Index (index.php) 페이지에서이 루프를 실행하는데, 문제없이 내 게시물을 표시한다.내 Wordpress Query가 비 인덱스 페이지에서 작동하지 않는 이유는 무엇입니까?
하지만이 코드를 다른 페이지에서 사용하려고하면 게시물이 없습니다.
이유를 설명 할 수 있습니까?
Ta!
<?php
$args = array(
'post_type' => 'post',
);
$query = new WP_Query($args);
if ($query->have_posts()) :
// Start the Loop.
while (have_posts()) : the_post();
get_template_part('content', get_post_format());
endwhile;
// Previous/next post navigation.
twentyfourteen_paging_nav();
else :
get_template_part('content', 'none');
endif;
?>
이 템플릿의 이름은 무엇입니까 ?? –