Suporte » Temas » Posts por página não funcionando

  • Boa tarde pessoal, quando vou na opção Configurações > Leitura > As páginas do blog mostram no máximo [ ], simplesmente não acontece nada, o site sempre mostra 10, e antes de alterar o servidor de hospedagem pra um VPS funcionava normalmente.
    Tentei adicionar o query_posts( $query_string . ‘&posts_per_page=1’ ); Sem sucesso. Sou novato em WP qualquer ajuda seria válida. Uma cópia do home.php pra ajudar:

    <?php get_header(); ?>
    
    <?php
    $stickies = get_option('sticky_posts');
    rsort($stickies);
    
    $slideshow_cat	= arras_get_option('slideshow_cat');
    $featured_cat 	= arras_get_option('featured_cat');
    $news_cat 		= arras_get_option('news_cat');
    
    $slideshow_count	= (int)arras_get_option('slideshow_count');
    $featured_count 	= (int)arras_get_option('featured_count');
    ?>
    
    <div id="content" class="section">
    <?php arras_above_content() ?>
    
    <?php if (!$paged) : ?>
    
    <?php arras_above_index_featured_post() ?>
    
    <!-- Featured Articles -->
    <?php if ( $featured_cat !== '' && $featured_cat != '-1' ) : ?>
    <div id="index-featured">
    <?php if ( arras_get_option('featured_title') != '' ) : ?>
    	<div class="home-title"><?php _e( arras_get_option('featured_title'), 'arras' ) ?></div>
    <?php endif ?>
    	<?php
    	if ($featured_cat == '-5') {
    		if (count($stickies) > 0) {
    			$query2 = array('post__in' => $stickies, 'showposts' => $featured_count );
    			if ( arras_get_option('slideshow_cat') == $featured_cat ) {
    				$query2['offset'] = $slideshow_count;
    			}
    		}
    	} else {
    		if ($featured_cat == '0') {
    			$query2 = 'showposts=' . $featured_count;
    		} else {
    			$query2 = 'showposts=' . $featured_count . '&cat=' . $featured_cat;
    		}
    
    		if ( $slideshow_cat == $featured_cat ) {
    			$query2 .= '&offset=' . $slideshow_count;
    		}
    	}
    
    	arras_render_posts( apply_filters('arras_featured_query', $query2), arras_get_option('featured_display'), 'featured' );
    	?>
    </div><!-- #index-featured -->
    <?php endif; ?>
    
    <?php arras_above_index_news_post() ?>
    
    <!-- News Articles -->
    <div id="index-news">
    <?php if ( arras_get_option('news_title') != '' ) : ?>
    <div class="home-title"><?php _e( arras_get_option('news_title') ) ?></div>
    <?php endif ?>
    <?php
    $news_query_args = array(
    	'cat' => $news_cat,
    	'paged' => $paged,
    	'showposts' => ( (arras_get_option('index_count') == 0 ? get_option('posts_per_page') : arras_get_option('index_count')) ),
    	'caller_get_posts' => 1
    );
    
    $news_offset = 0;
    if ($slideshow_cat == $news_cat) {
    	$news_offset += $slideshow_count;
    }
    if ($featured_cat == $news_cat) {
    	$news_offset += $featured_count;
    }
    $news_query_args['offset'] = $news_offset;
    
    query_posts( apply_filters('arras_news_query', $news_query_args) );
    arras_render_posts(null, arras_get_option('news_display'), 'news'); ?>
    
    <?php if(function_exists('wp_pagenavi')) wp_pagenavi(); else { ?>
    	<div class="navigation clearfix">
    		<div class="floatleft"><?php next_posts_link( __('Older Entries', 'arras') ) ?></div>
    		<div class="floatright"><?php previous_posts_link( __('Newer Entries', 'arras') ) ?></div>
    	</div>
    <?php } ?>
    </div><!-- #index-news -->
    
    <?php arras_below_index_news_post() ?>
    
    <?php $sidebars = wp_get_sidebars_widgets(); ?>
    
    <div id="bottom-content-1">
    	<?php if ( isset($sidebars['sidebar-4']) ) : ?>
    	<ul class="clearfix xoxo">
        	<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Bottom Content #1') ) : ?>
    
    <li></li>
            <?php endif; ?>
    
    	<?php endif; ?>
    </div>
    
    <div id="bottom-content-2">
    	<?php if ( isset($sidebars['sidebar-5']) ) : ?>
    	<ul class="clearfix xoxo">
        	<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Bottom Content #2') ) : ?>
    
    <li></li>
            <?php endif; ?>
    
    	<?php endif; ?>
    </div>
    
    <?php else: ?>
    
    <div class="home-title"><?php _e('Latest Headlines', 'arras') ?></div>
    
    <div id="archive-posts">
    	<?php arras_render_posts(null, arras_get_option('archive_display'), 'archive') ?>    
    
    	<?php if(function_exists('wp_pagenavi')) wp_pagenavi(); else { ?>
        	<div class="navigation clearfix">
    			<div class="floatleft"><?php next_posts_link( __('« Older Entries', 'arras') ) ?></div>
    			<div class="floatright"><?php previous_posts_link( __('Newer Entries »', 'arras') ) ?></div>
    		</div>
        <?php } ?>
    </div><!-- #archive-posts -->
    
    <?php endif; ?>
    
    <?php arras_below_content() ?>
    </div><!-- #content -->
    
    <?php get_sidebar(); ?>
    </div><!-- #main-container -->
    
    <?php get_footer(); ?>
Visualizando 2 respostas - 1 até 2 (de um total de 2)
  • Se for um tema “premium” veja se ele não possui um painel para definir o no. de post/paginas.

    Criador do tópico Spytronic

    (@spytronic)

    Muito Obrigada Diana, realmente era isso, vontade de me matar kkkkkkkk
    é que depois da migração para o VPS deu tanto problema que agora qualquer coisa eu já acho que é problema difícil.

    🙂

Visualizando 2 respostas - 1 até 2 (de um total de 2)
  • O tópico ‘Posts por página não funcionando’ está fechado para novas respostas.