• Hi,

    I found some problem with my Next/Previous: it does not work.

    Do you have any idea of what could it be?

    My index.php page is this one (theme: arthemia):

    <?php get_header(); ?>
    
    	<?php if(!is_paged()) { ?>
    
    	<div id="top" class="clearfloat">
    
    		<div id="headline">
    		<img src="<?php echo get_option('home'); ?>/wp-content/themes/arthemia/images/headline.png" width="75px" height="21px" alt="" />
    		<?php query_posts("showposts=1&category_name=Headline"); ?>
    		<?php while (have_posts()) : the_post(); ?>	
    
    	<div class="title"><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></div>
    	<div class="meta">[<?php the_time('j M Y') ?> | <?php comments_popup_link('No Comment', 'One Comment', '% Comments');?> | <?php if(function_exists('the_views')) { the_views(); } ?>]</div>
    	<?php $values = get_post_custom_values("Headline");?>
     	<a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>">
    <img src="<?php echo bloginfo('template_url'); ?>/scripts/timthumb.php?src=/<?php
    $values = get_post_custom_values("Image"); echo $values[0]; ?>&w=300&h=275&zc=1&q=100"
    alt="<?php the_title(); ?>" class="left" width="300px" height="275px"  /></a>
    	<?php the_excerpt(); ?>
    	<a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>">Read the full story &raquo;</a>
    	<?php endwhile; ?>
    		</div>
    
    	<div id="featured">
    
    	<img src="<?php echo get_option('home'); ?>/wp-content/themes/arthemia/images/featured.png" width="75px" height="21px" alt="" />
    
    	<?php query_posts("showposts=4&category_name=Featured"); $i = 1; ?>
    
          	<?php while (have_posts()) : the_post(); ?>
    	<div class="clearfloat">
    	<?php $values = get_post_custom_values("Image");
    	if (isset($values[0])) { ?>
          <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>">
    	<img src="<?php echo bloginfo('template_url'); ?>/scripts/timthumb.php?src=/<?php
    $values = get_post_custom_values("Image"); echo $values[0]; ?>&w=100&h=65&zc=1&q=100"
    alt="<?php the_title(); ?>" class="left" width="100px" height="65px"  /></a>
          <?php } ?>
    	<div class="info"><a href="<?php the_permalink() ?>" rel="bookmark" class="title"><?php the_title(); ?></a>
    <div class="meta">[<?php the_time('j M Y') ?> | <?php comments_popup_link('No Comment', 'One Comment', '% Comments');?> | <?php if(function_exists('the_views')) { the_views(); } ?>]</div>	
    
    </div>
    </div>
    
          <?php endwhile; ?>
    
    	</div>
    
    </div>	
    
    	<div id="middle" class="clearfloat">
    	<img src="<?php echo get_option('home'); ?>/wp-content/themes/arthemia/images/category.png" class="clearfloat" alt="" />
    	<?php $display_categories = array(8,7,3,4,14); $i = 1;
    	foreach ($display_categories as $category) { ?>
    
    	<div id="cat-<?php echo $i; ?>" class="category">
    		<?php query_posts("showposts=1&cat=$category")?>
    		<span class="cat_title"><a href="<?php echo get_category_link($category);?>"><?php single_cat_title(); ?></a></span>
    		<a href="<?php echo get_category_link($category);?>"><?php echo category_description($category); ?></a>
    
    	</div>
    
    	<?php $i++; ?>
        	<?php } ?>
    
    	</div>
    
    	<?php } ?>
    
    	<div id="bottom" class="clearfloat">
    <?php include (ABSPATH . '/wp-content/plugins/wp-glideshow/glideshow.php'); ?>
    	<div id="front-list">	
    
    	<?php
          $page = (get_query_var('paged')) ? get_query_var('paged') : 1;
          query_posts("cat=-5,-71&paged=$page&posts_per_page=7"); ?>
    
    	<?php while (have_posts()) : the_post(); ?>		
    
    	<div class="clearfloat">
    
    	<h3 class=cat_title><?php the_category(', '); ?> &raquo</h3>
    	<div class="title"><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></div>
    	<div class="meta">[<?php the_time('j M Y') ?> | <?php comments_popup_link('No Comment', 'One Comment', '% Comments');?> | <?php if(function_exists('the_views')) { the_views(); } ?>]</div>	
    
    	<div class="spoiler">
    	<?php	$values = get_post_custom_values("Image");
    	if (isset($values[0])) { ?>
          <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>">
    	<img src="<?php echo bloginfo('template_url'); ?>/scripts/timthumb.php?src=/<?php
    $values = get_post_custom_values("Image"); echo $values[0]; ?>&w=150&h=150&zc=1&q=100"
    alt="<?php the_title(); ?>" class="left" width="150px" height="150px"  /></a>
          <?php } ?>
    
    	<?php the_excerpt(); ?>
    	</div>
    
    	</div>
    
          <?php endwhile; ?>
    
    	<div class="navigation">
    	 <?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); }
    			else { ?>
    
    			<div class="right"><?php next_posts_link('Next Page &raquo;') ?></div>
    			<div class="left"><?php previous_posts_link('&laquo; Previous Page') ?></div>
    			<?php } ?> 
    
    <!-- Page number inattivo
    <?php if(function_exists('wp_page_numbers')) : wp_page_numbers(); endif; ?>
    -->
    
    	</div>
    
    	</div>
    
    	<?php get_sidebar(); ?>
    
    	</div>	
    
    <?php get_footer(); ?>

    Any idea?
    Luca

Viewing 5 replies - 1 through 5 (of 5 total)
  • out of curiousity, are you just trying to get the default navigation working? Or are you using a plugin?

    it looks as though your theme is set up for some plugins, such as this one:

    https://www.ads-software.com/extend/plugins/wp-pagenavi/

    (I use that one btw, took a couple minutes to get the css to match mine, and looks pretty good now)

    Thread Starter Luca75

    (@luca75)

    Thank you for your suggestions.

    out of curiousity, are you just trying to get the default navigation working? Or are you using a plugin?

    Actually, i have two problems:

    First in my website installation next/previous buttons do not work, even in default installation

    Second, I tried to solve the problem with some plugin (So RVoodoo you’re right) but does not work anyway.

    I read the article (thank you Shane), but I did not catch the problem. Does anyone find any mistake in index.php that can create some problem (both with and without plugins)?

    What can I do?
    Luca

    Thread Starter Luca75

    (@luca75)

    Ok, I found out the problem, even if I do not know the reason.

    First: Arthemia uses WP-Page Navi Plugin.
    There a problem in setting: Number of posts per page (General Readings Setting in WP) and Number of post in index.php of Arthemia Theme ( query_posts(“cat=-5,-71&paged=$page&posts_per_page=7”); ?> ) must be the same, other wise it does not work (and maybe this is the solution to a very common problem with this theme, also here in WP.org).

    Second, I think that another plugin (WP-Glideshows – in my index.php indicated by [<?php include (ABSPATH . ‘/wp-content/plugins/wp-glideshow/glideshow.php’); ?>])enters in some way in conflict with wp-page navi: if you comment this string, wp-page navi works properly.

    So, even if I do not know why, but in some way I solved the problem.

    Does anyone have an explanation for it?
    Luca

    @ luca75
    Thanks so much for posting your solution I am using the Arthemia theme on one of my sites and I could not figure out why the pagination did not work.
    A had given up and decided to use the default permalinks which made the pagination work but it is better for the search engines if you can use something like month and name style permalink structure.
    This is such an easy solution, I don’t know why I did not see it before.

    Thanks again!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Next/Previous Button – Problems’ is closed to new replies.