WordPress.org

Ready to get started?Download WordPress

Forums

Pagination Not Working on Default.php But Works on Blogstyle.php (2 posts)

  1. Aiirene
    Member
    Posted 1 year ago #

    http://www.irenewithlove.com
    I could choose which layout style I would prefer: default (magazine style layout, with limited words shown) and blogstyle (simply a blog layout). And currently showing up is blog style layout.

    When I select Blogstyle layout, the pagination shows up and works properly. But when I select default layout, the pagination disappears.

    However, I notice the both layout's pagination code is the same.

    Code for Defaultindex.php:

    <?php if (have_posts()) : while (have_posts()) : the_post();
      if( $post->ID == $do_not_duplicate ) continue; update_post_caches($posts); ?>
    <div class="home-post-wrap-2">
    <span class="post-info">Posted by <span style="color: #000;"><?php the_author() ?></span> | <?php the_time('M jS, Y') ?></span>
    <h2 class="titles"><a href="<?php the_permalink() ?>" title="Permanent Link to <?php the_title(); ?>"><?php the_title() ?></a></h2>
    <div style="clear: both;"></div>
    <?php $thumb = get_post_meta($post->ID, 'Thumbnail', $single = true); ?>
    <?php if($thumb !== '') { ?>
    <div class="thumbnail-div">
    <a href="<?php the_permalink() ?>" title="Permanent Link to <?php the_title(); ?>"><img src="<?php bloginfo('stylesheet_directory'); ?>/timthumb.php?src=<?php echo $thumb; ?>&h=98&w=98&zc=1" alt="<?php if($thumb_alt !== '') { echo $thumb_alt; } else { echo the_title(); } ?>"  style="border: none;" /></a>
    </div>
    <?php } else { echo ''; } ?>
    <?php the_content_limit(410, ""); ?>
    </div>
    
    <?php endwhile; ?>
    
    <div style="clear: both;"></div>
    
    <?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); }
    else { ?>
    
    <p class="pagination"><?php next_posts_link('« Previous Entries') ?> <?php previous_posts_link('Next Entries »') ?></p>
    <?php } ?>
    <?php else : ?>
    
    <h2 >No Results Found</h2>
    
    <p>Sorry, your search returned zero results. </p>
    
    <?php endif; ?>

    And code for blogstyle.php

    <?php if (have_posts()) : while (have_posts()) : the_post();
      if( $post->ID == $do_not_duplicate ) continue; update_post_caches($posts); ?>
    <div class="home-post-wrap-3">
    <h1 class="post-title"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h1>
    <div class="post-info">Posted by <?php the_author() ?> in  <?php the_category(', ') ?> on  <?php the_time('m jS, Y') ?> |  <a href="#respond" title="<?php _e("Leave a comment"); ?>"><?php comments_number('no responses','one response','% responses'); ?></a></div>
    <div class="rule"></div>
    <div style="clear: both;"></div>
    <?php if (get_option('artsee_thumbnails') == 'Hide') { ?>
    <?php { echo ''; } ?>
    <?php } else { include(TEMPLATEPATH . '/includes/thumbnail.php'); } ?>
    <?php the_content(); ?>
    </div>
    <?php endwhile; ?>
    
    <div style="clear: both;"></div>
    
    <?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); }
    else { ?>
    
    <p class="pagination"><?php next_posts_link('« Previous Entries') ?> <?php previous_posts_link('Next Entries »') ?></p>
    <?php } ?>
    <?php else : ?>
    
    <h2 >No Results Found</h2>
    
    <p>Sorry, your search returned zero results. </p>
    
    <?php endif; ?>

    What I did wrong here?

  2. keesiemeijer
    moderator
    Posted 1 year ago #

    http://codex.wordpress.org/Pagination#Troubleshooting_Broken_Pagination

    As this is a premium theme which you paid for, your purchase should have included support from either the theme author or where you purchased the theme from. It would be best to contact them for specific instructions on how to solve this issue.

Topic Closed

This topic has been closed to new replies.

About this Topic