• amilleiro

    (@amilleiro)


    Hi,

    I’ve just installed October Special theme for WordPress and i’ve seen a strange thing that i can’t arrange! I can add at the end of the pages the “Previous pages” but it’s imposible!!! please!!

    The theme has two strange pages, home.php and index.php, i paste the code.

    index.php

    <?php get_header(); ?>
    <div id="content_wrapper">
    	<div id="content_inner" class="clearfix">
    		<div class="content_left">
    			<?php if (have_posts()) : ?>
    			<?php while (have_posts()) : the_post(); ?>
    				<div class="post" id="post-<?php the_ID(); ?>">
    					<div class="post_date">
    
    					<?php the_time('j \d\e F \d\e Y') ?><br />
    				Categoría: <?php the_category(', ') ?><br />
    <?php the_tags('Etiquetas: ',' , '); ?><br />
    					<?php comments_popup_link('No hay comentarios', 'Un comentario', '% comentarios'); ?>
    					</div>
    					<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>
    					<div class="entry">
    					<?php the_content_rss('', TRUE, '', 50); ?>
    
    					</div>
    				<div class="clear"></div>
    
                                   </div>
    
    			<?php endwhile; ?>
    			<?php else : ?>
    			<div class="post" id="post-<?php the_ID(); ?>">
    				<h2>No hay nada aquí</h2>
    				<div class="entry">
    					<p>En esta página no hay nada, lo siento. Vuelve atrás y sigue disfrutando de este blog.</p>
    
    				</div>
    			<div class="clear"></div>
    			</div>
    			<?php endif; ?>
    			<br />
    
    			<div class="nextprevious">
    				<div class="left"><?php next_posts_link('&laquo; Anteriores') ?></div>
    				<div class="right"><?php previous_posts_link('Siguientes &raquo;') ?></div>
    			</div>
    			<div class="clear"></div>
    		</div>
    		<div class="content_right">
    			<?php include (TEMPLATEPATH . '/main_right.php'); ?>
    		</div>
    		<div class="clear"></div>
    	</div>
    </div>
    <div id="bottom_wrapper">
    	<div id="bottom_inner" class="clearfix">
    		<div class="bottom_left">
    		<?php include (TEMPLATEPATH . '/bottom_posts.php'); ?>
    		</div>
    		<?php include (TEMPLATEPATH . '/bottom_right.php'); ?>
    		<div class="clear"></div>
    	<div id="categories">
    		<h3>Categorías</h3>
    		<ul>
    			<?php wp_list_cats('sort_column=name&optioncount=0'); ?>
    		</ul>
    	</div>
    	</div>
    </div>
    <?php get_footer(); ?>

    and home.php, what I think that shows when I enter my page. See the strange thing that does with that <?php $top_query = new WP_Query(‘showposts=8’); ?>

    <?php get_header(); ?>
    
    <div id="content_wrapper">
    
    	<div id="content_inner" class="clearfix">
    
    		<div class="content_left">
    
    		<?php $top_query = new WP_Query('showposts=8'); ?>
    		<?php while($top_query->have_posts()) : $top_query->the_post(); $first_post = $post->ID; ?>
    			<div class="post" id="post-<?php the_ID(); ?>">
    				<div class="post_date">
                                    <?php PSR_show_voting_stars(); ?>
    				<?php the_time('j \d\e F \d\e Y') ?><br />
    				Categoría: <?php the_category(', ') ?><br />
    <?php the_tags('Etiquetas: ',' , '); ?>
         <?php if(function_exists('the_ratings')) { the_ratings(); } ?>
    					<div class="extra_status">
    					<?php comments_popup_link('No hay comentarios', 'Un comentario', '% comentarios'); ?>
    					</div>
    				</div>
    				<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>
    					<div class="entry">
    					<?php the_content('[Sigue leyendo...]'); ?>
    					</div>
    
    					<div class="clear"></div>
    
    			</div>
    
    		<?php endwhile; ?>
    
    		</div>
    
    		<div class="content_right">
    		<?php include (TEMPLATEPATH . '/main_right.php'); ?>
    		</div>
    	</div>
    
    </div>
    <div id="bottom_wrapper">
    	<div id="bottom_inner" class="clearfix">
    		<div class="bottom_left">
    
    		</div>
    		<?php include (TEMPLATEPATH . '/bottom_right.php'); ?>
    		<div class="clear"></div>
    	<div id="categories">
    		<h3>Categorías</h3>
    		<ul>
    		<?php wp_list_cats('sort_column=name&optioncount=0'); ?>
    		</ul>
    	</div>
    	</div>
    </div>
    <?php get_footer(); ?>
Viewing 2 replies - 1 through 2 (of 2 total)
  • Samuel B

    (@samboll)

    Thread Starter amilleiro

    (@amilleiro)

    If you see my code you can see:

    <div class="nextprevious">
    				<div class="left"><?php next_posts_link('&laquo; Anteriores') ?></div>
    				<div class="right"><?php previous_posts_link('Siguientes &raquo;') ?></div>
    			</div>
    			<div class="clear"></div>

    but it don’t show it!!!

    i think is something about this:

    <?php $top_query = new WP_Query('showposts=8'); ?>
    		<?php while($top_query->have_posts()) : $top_query->the_post(); $first_post = $post->ID; ?>
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Trying to add “Previous pages” and “next pages”’ is closed to new replies.