• Hello, I am having troubles with my archive page. It is not sorting, but the URL shows its sorting and the titles change as if it was supposed to be that month but every month shows the same posts from beginning of time to end.

    <?php include ('header.php'); ?>
    
    <div class="container" id="pageWrapper">
    	<div class="row">
        	<div class="ninecol">
            <h2><a>" style="color:#ccc; text-decoration:none;">Home</a> <?php  wp_title(' >>'); ?></h2>
            	<div class="twelvecol">
                <?php
    
        			$recent 	=	new WP_Query();
    				$recent 	->	query('showposts=12');
    				$x	=	1;
    
    				while($recent	->	have_posts())	:	$recent	->	the_post();
    				$lastclass	=	($x	==	3	||	$x % 3 == 0) ? ' last' : '' ;
    
        		?>
    			<?php
    			// Check if there is a featured image first for that post
    			 if(has_post_thumbnail()){
    			?>
                	<div class="fourcol<?php echo $lastclass ?>" id="archiveContent"><a>"><?php the_post_thumbnail('large'); ?></a>
                        <hr id="arrowUp"/>
                        <h4><a>"><?php the_title(); ?></a></h4>
                    </div>
                    <?php
               $x++;}
    			  endwhile;
                             ?>
                </div><!--ENDTWELVECOL-->
    
            </div><!--NineCOLend-->
            <div class="threecol last">
            	<?php include ('sidebar.php'); ?>
    
            </div><!-- END FOURCOL -->
        </div><!-- END ROW -->
    </div><!-- NED CONTAINER -->
    
    <?php include ('footer.php'); ?>

    [Moderator Note: Please post code or markup between backticks or use the code button. Or better still – use a pastebin. Your posted code may now have been permanently damaged by the forum’s parser.]

    This is my code and wondering if anyone can help me figure out why this is not working in sorting, thanks so much.

    Colt

  • The topic ‘Archive Not Sorting’ is closed to new replies.