저는 WordPress의 템플릿 편집을 처음 사용하고 있으며 내 사이트에 표시 할 페이지 설명을 얻으려고하고 있지만 표시되지 않습니다. 내가 설명을 표시 할 얻기 위해 노력하고있어 URL은 여기에 있습니다 :Wordpress/PHP - 페이지 설명을 표시하는 방법
http://fourwallsla.com/category/the-neighborhood/east-side/
나는 워드 프레스 내에서 페이지 설명의 스크린 샷을 첨부했습니다. 아카이브 템플리트를 사용하는 것 같습니다 (왜 페이지 템플리트를 사용하지 않습니까?).
여기 아카이브 템플릿 코드의 일부입니다 :
위의 코드, the_post()에 적절 페이지에 표시되는 카테고리 내 홈 목록에 대한 내용을 참조,<div class="main">
<?php if (have_posts()) : $first = true; ?>
<?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?>
<?php /* If this is a category archive */ if (is_category()) { ?>
<h1><?php single_cat_title(); ?></h1>
<?php /* If this is a tag archive */ } elseif(is_tag()) { ?>
<h1><?php single_tag_title(); ?></h1>
<?php /* If this is a daily archive */ } elseif (is_day()) { ?>
<h1><?php echo get_the_time('F jS, Y'); ?></h1>
<?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
<h1><?php echo get_the_time('F, Y'); ?></h1>
<?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
<h1><?php echo get_the_time('Y'); ?></h1>
<?php /* If this is an author archive */ } elseif (is_author()) { ?>
<h1><?php _e('Author Archive', 'gray_white_black'); ?></h1>
<?php /* If this is a paged archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
<h1><?php _e('Blog Archives', 'gray_white_black'); ?></h1>
<?php } ?>
<ul class="post-list">
<?php while (have_posts()) : the_post();
. 그러나 스크린 샷에 표시된 페이지 자체에 대해 the_post()를 얻으려면 어떻게해야합니까? 감사.
당신이 카테고리 내의 모든 게시물을 검색하기 때문에 그것은 archive.php 템플릿을 사용
IMHO, 당신은 잘못된 템플릿을 그것을 여기 http://codex.wordpress.org/ 확인 Template_Hierarchy – Sergey
그래, 저도 그런 식으로 보였습니다.하지만 테마를 만들지 않았고, 다른 모든 것이 내 친구가 사이트에서 원하는 방식이기 때문에 템플릿을 변경하지 않는 것이 좋습니다. – mheavers