• I am using a customized home page for the responsive theme using child theme. I have added a piece of code that shows the latest posts on the home page. The older posts go to the next page once clicking on “older posts” button, but the “newer posts” button is not showing to go back to the previous page. The site is carmentv.ca.

    Here is the code. I appreciate if a WordPress/php genius can help me figure out how to fix this 🙂

    <div id="latest-posts">
    <h3 style="font-size:18px;">Check Out the Latest Videos</h3>
    
    <?php global $more; $more = 0; ?>
    
    <?php
        if ( get_query_var('paged') )
    	    $paged = get_query_var('paged');
    	elseif ( get_query_var('page') )
    	    $paged = get_query_var('page');
    	else
    		$paged = 1;
    		query_posts("post_type=post&paged=$paged");
    ?>
    <?php if (have_posts()) : ?>
    
    		<?php while (have_posts()) : the_post(); ?>
    
                <div class="recent-post" id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    
                     <?php if ( has_post_thumbnail()) { ?>
                            <a>" title="<?php the_title_attribute(); ?>" >
                        <?php the_post_thumbnail(array(177,116)); ?>
                            </a>
                            <?php } else { ?>
    
                            <img src="<?php bloginfo('template_directory'); ?>/images/default-tv.png" alt="<?php the_title(); ?>" />
    
                        <?php } ?>
                        <p><a>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a>
    
                 <?php the_time('F j, Y'); ?></p>
    
                </div><!-- end of #post-<?php the_ID(); ?> -->
    
            <?php endwhile; ?> 
    
            <?php if (  $wp_query->max_num_pages > 1 ) : ?>
            <div class="navigation">
    			<div class="previous"><?php next_posts_link( __( '‹ Older posts', 'responsive' ) ); ?></div>
                <div class="next"><?php previous_posts_link( __( 'Newer posts ›', 'responsive' ) ); ?></div>
    		</div><!-- end of .navigation -->
            <?php endif; ?>
    
    <?php endif; ?>  
    
    </div><!-- end of latest posts -->

    [Moderator Note: Please post code & markup between backticks or use the code button. Your posted code has now been permanently damaged by the forum’s parser.]

  • The topic ‘the newer post link is not working/showing’ is closed to new replies.