Цикл have_posts()) : the_post() отдает не все посты

в одной из тем столкнулся с проблемой что цикл have_posts()) : the_post() отдает только посты из одной рубрикию. временно нашел решение с помощью вывода через другой скриптю. но подозреваю что это может иметь недостатки.
поэтому хочется все таки (да и для себя) разобраться почему цикл отдает не ВСЕ посты.

код вывода в принципе стандартный:

<?php if (have_posts()) : ?>
        <?php while (have_posts()) : the_post(); ?>
        <div class="post indexpost" id="post-<?php the_ID(); ?>">
            <?php
                $customfields = get_post_custom();
                $scrp = get_bloginfo('wpurl') . '/tt-scripts/timthumb.php?';
                if (empty($customfields['paddimage'][0])) {
                    $imgpath = $scrp . 'src=' . get_bloginfo('wpurl') . '/wp-content/themes/mahusay/images/thumbnail.png' . '&amp;w=125&amp;h=125&amp;zc=1';
                } else {
                    $imgpath = $scrp . 'src=' . get_bloginfo('wpurl') .  $customfields['paddimage'][0] . '&amp;w=125&amp;h=125&amp;zc=1';
                }
            ?>
            <div class="title">
                <p>
                    <span class="date"><?php the_time(' j F Y'); ?></span>
                    <span class="nodisplay">|</span>
                    <span class="comments"><?php comments_number('Нет комментариев', 'Один комментарий', '% коммент.' );?></span>
                    <span class="nodisplay">|</span>
                    <span class="categories"><?php echo $latcat->cat_name; ?></span>
                </p>
            </div>
            <img class="header" src="<?php echo $imgpath; ?>" alt="<?php the_title(); ?>" />
            <div class="entry">
                <h2 class="title"><a href="<?php the_permalink() ?>" rel="bookmark" title=" <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
                <?php themefunction_content(600,'');?>
            </div>
        </div>
        <?php endwhile; ?>

единственное, что могу добавить, это то что перед выводом постов есть только функция вызова хедера, где единственная подозрительная функция это, но после ее оотключения – ничего не изменилось.

код функции:

function themefunction_list_pages() {
    add_filter('wp_list_pages','themefunction_alter_list_pages');
    wp_list_pages('title_li=');
    remove_filter('wp_list_pages','themefunction_alter_list_pages');
}

function themefunction_alter_list_pages($string) {
    $string = str_replace(array("\n","\r","\t"),'', $string);

    $pattern = array('/<ul[^<>]*>/','/<\/ul[^<>]*>/');
    $replace = array('','');
    $string = preg_replace($pattern,$replace,$string);
    $pattern = array('/<a[^<>]*>/','/<\/a[^<>]*>/');
    $replace = array('$0<span><span>','</span></span>$0');
    $string = preg_replace($pattern,$replace,$string);

    $string = str_replace(array('</a><li','</li></li>'),array('</a></li><li','</li>'),$string);
    return $string;

кто нибудь может помочь? сам в тупике (

Anonymous
Отправить
Ответ на: