помогите с кодом wordpress

[Удален]
435

есть страница индекс с кодом

<?php get_header(); ?>


<div class="container">

<?php query_posts(array
('post_type' => 'page',
'orderby' => get_option('theme_sort_pages'),
'order' => get_option('theme_order_page'),
'post__not_in' => get_option('theme_exclude_pages')
)); ?>
<?php if (have_posts()) : while (have_posts()) : the_post()?>

<div class="page">
<div class="heading clearfix">
<?php $pagetitle = get_the_title($post->ID);
$icon = get_post_meta($post->ID, 'Icon', $single = true);
$tagline = get_post_meta($post->ID, 'Tagline', $single = true); ?>

<?php $arr["thumbnail"][] = get_thumbnail(32,32,'','icon','icon',false,'Icon'); ?>

<h1 class="pagetitle"> <?php echo($pagetitle); ?> </h1>

<?php if ( $tagline <> '' ) { ?>
<span class="separator">|</span>
<span class="tagline"><?php echo $tagline; ?></span>
<?php }; ?>

<?php $page_titles['title'][] = $pagetitle;
$page_titles['icon'][] = $icon; ?>
</div> <!-- end .heading -->

<div class="entry">
<?php the_content(); ?>
</div> <!-- end .entry -->
</div> <!-- end .page -->

<?php endwhile; endif; wp_reset_query(); ?>

</div> <!-- end .container -->


</div> <!-- end #main-content -->

<div id="sidebar">

<ul id="nav">

<?php for ($i = 0; $i <= 4; $i++) { ?>
<li class="clearfix"><a href="#">
<?php if ($arr["thumbnail"][$i]["thumb"] <> '') { ?>
<?php print_thumbnail($arr["thumbnail"][$i]["thumb"], $arr["thumbnail"][$i]["use_timthumb"], 'icon', 32, 32); ?>
<?php }; ?>
<h7><?php echo($page_titles['title'][$i]); ?></h7>
</a></li>
<?php }; ?>
</ul>





<ul id="nav">

<?php for ($i = 5; $i <= 7; $i++) { ?>


<li class="clearfix"><a href="#">
<?php if ($arr["thumbnail"][$i]["thumb"] <> '') { ?>
<?php print_thumbnail($arr["thumbnail"][$i]["thumb"], $arr["thumbnail"][$i]["use_timthumb"], 'icon', 32, 32); ?>
<?php }; ?>
<h7><?php echo($page_titles['title'][$i]); ?></h7>
</a></li>
<?php }; ?>
</ul>


</div> <!-- end #sidebar -->

</div> <!-- end #page-wrap -->


<?php get_footer(); ?>

там есть класс nav и в нем вывод страниц происходит и функция <?php for ($i = 0; $i <= 4; $i++) { ?> выводит страницы с 1 по 5

<ul id="nav">

<?php for ($i = 0; $i <= 4; $i++) { ?>
<li class="clearfix"><a href="#">
<?php if ($arr["thumbnail"][$i]["thumb"] <> '') { ?>
<?php print_thumbnail($arr["thumbnail"][$i]["thumb"], $arr["thumbnail"][$i]["use_timthumb"], 'icon', 32, 32); ?>
<?php }; ?>
<h7><?php echo($page_titles['title'][$i]); ?></h7>
</a></li>
<?php }; ?>
</ul>

но мне необходимо страницы разбить на 2 блока и поэтому я добавил еще код, где функция <?php for ($i = 5; $i <= 7; $i++) { ?> вы водит страницы с 6 по 7

<ul id="nav">

<?php for ($i = 5; $i <= 7; $i++) { ?>


<li class="clearfix"><a href="#">
<?php if ($arr["thumbnail"][$i]["thumb"] <> '') { ?>
<?php print_thumbnail($arr["thumbnail"][$i]["thumb"], $arr["thumbnail"][$i]["use_timthumb"], 'icon', 32, 32); ?>
<?php }; ?>
<h7><?php echo($page_titles['title'][$i]); ?></h7>
</a></li>
<?php }; ?>
</ul>

но почему то во втором блоке с 6 по 7 страницу выводятся только названия самих страниц, а при клике на них попадаю на страницы 1 и 2 соответственно...

может есть тут гуру вордпресс?

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