Архив записей wordpress

сергей-034
На сайте с 14.06.2009
Offline
281
2528

В общем выводит в архиве только заголовки... Как сделать чтоб всю запись показывал? :popcorn:

Код:

<?php get_header(); ?>


<?php if (have_posts()) : ?>

<?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?>
<?php /* If this is a category archive */ if (is_category()) { ?>
<h1 class="decay"><?php echo single_cat_title(); ?></h1>

<?php /* If this is a daily archive */ } elseif (is_day()) { ?>
<h1 class="decay">Archive for <?php the_time('F jS, Y'); ?></h1>

<?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
<h1 class="decay">Archive for <?php the_time('F, Y'); ?></h1>

<?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
<h1 class="decay">Archive for <?php the_time('Y'); ?></h1>

<?php /* If this is an author archive */ } elseif (is_author()) { ?>
<h1 class="decay">Author Archive</h1>

<?php /* If this is a paged archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
<h1 class="decay">Blog Archives</h1>

<?php } ?>

<?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } ?>

<div class="clearer"><span></span></div>

<?php while (have_posts()) : the_post(); ?>
<div class="post">

<h1 id="post-<?php the_ID(); ?>"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h1>

<div class="descr"><?php the_time('l F jS, Y') ?> Рубрика <?php the_category(', ') ?> | <?php edit_post_link('Редактировать', '', ' | '); ?> <?php comments_popup_link('Нет комментариев &#187;', 'Комментариев (1) &#187;', 'Комментариев (%) &#187;'); ?></div>

</div>

<?php endwhile; ?>

<?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } ?><br>
<!-- Блок Блок №1, создан 18.03.11 -->
<div id="block-1300480724"></div>
<div class="clearer"><span></span></div>

<?php else : ?>

<h2 class="decay">НЕ НАЙДЕНО</h2>
<?php include (TEMPLATEPATH . '/searchform.php'); ?>

<?php endif; ?>

<?php get_sidebar(); ?>
<?php get_footer(); ?>
© Лучше с умным потерять, чем с дураком найти.
Mad_Man
На сайте с 10.11.2008
Offline
162
#1

function.php нужен.

сергей-034
На сайте с 14.06.2009
Offline
281
#2
Mad_Man:
function.php нужен.

<?php


if ( function_exists('register_sidebar') )
{
register_sidebar(array(
'before_widget' => '<div class="widget">',
'after_widget' => '</div>',
'before_title' => '<h2 class="decay">',
'after_title' => '</h2>',
));
}

?>
Mad_Man
На сайте с 10.11.2008
Offline
162
#3

Предположим, что супер-пупер секретная тема, исходники которой не покажут никогда всё же не содержит аналога function.php.

<?php
if (is_sticky()) {
global $more; // Declare global $more (before the loop).
$more = 1; // Set (inside the loop) to display all content, including text below more.
the_content();
} else {
global $more;
$more = 0;
the_content('Read the rest of this entry »');
}
?>

http://codex.wordpress.org/Function_Reference/the_content

сергей-034
На сайте с 14.06.2009
Offline
281
#4
Mad_Man
На сайте с 10.11.2008
Offline
162
#5
yura@R510:~$ grep -rl the_content /home/yura/Загрузки/decayed-wordpress-theme
/home/yura/Загрузки/decayed-wordpress-theme/decayed/index.php
/home/yura/Загрузки/decayed-wordpress-theme/decayed/page.php
/home/yura/Загрузки/decayed-wordpress-theme/decayed/single.php
<?php the_content('Read the rest of this entry &raquo;'); ?>

Аргумент в скобках (не важно что за надпись) означает, что вывод идёт только на первые 55(?) слов. Удалите скобу, будет счастье.

сергей-034
На сайте с 14.06.2009
Offline
281
#6

Не помогло,... Если удалить, то везде только заголовки

N
На сайте с 15.12.2006
Offline
49
#7



<?php while (have_posts()) : the_post(); ?>
<div class="post">

<h1 id="post-<?php the_ID(); ?>"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h1>

<div class="descr"><?php the_time('l F jS, Y') ?> Рубрика <?php the_category(', ') ?> | <?php edit_post_link('Редактировать', '', ' | '); ?> <?php comments_popup_link('Нет комментариев &#187;', 'Комментариев (1) &#187;', 'Комментариев (%) &#187;'); ?></div>

/* Внимание! Старт! */
<div class="entry"><?php the_content(); ?></div>
/* Стоп! */

</div>

<?php endwhile; ?>

обратите внимание на разницу с Вашим кодом и внесите в свой соответсвующие изменения. За вывод тела записи отвечает непосредственно функция the_content (которая должна быть в цикле Loop) - ее в вашем коде не было.

сергей-034
На сайте с 14.06.2009
Offline
281
#8

NAMnam, вот теперь все гуд :) Спасибо!!!

Авторизуйтесь или зарегистрируйтесь, чтобы оставить комментарий