Title: kittywake's Replies | WordPress.org

---

# kittywake

  [  ](https://wordpress.org/support/users/kittywake/)

 *   [Profile](https://wordpress.org/support/users/kittywake/)
 *   [Topics Started](https://wordpress.org/support/users/kittywake/topics/)
 *   [Replies Created](https://wordpress.org/support/users/kittywake/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/kittywake/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/kittywake/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/kittywake/engagements/)
 *   [Favorites](https://wordpress.org/support/users/kittywake/favorites/)

 Search replies:

## Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)

 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Group posts by month ?](https://wordpress.org/support/topic/group-posts-by-month/)
 *  [kittywake](https://wordpress.org/support/users/kittywake/)
 * (@kittywake)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/group-posts-by-month/#post-1093656)
 * I have something similar on [my blog](http://kittywake.us/?page_id=3) – but I
   don’t show the date of each post: just the title.
 *     ```
       <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>				<ul >
       <?php
       /**/
       $years = $wpdb->get_col("SELECT DISTINCT YEAR(post_date) FROM $wpdb->posts WHERE post_status = 'publish' AND post_type = 'post' ORDER BY post_date ASC");
       foreach($years as $year) :
       ?>
   
       	<h4><li><a href="<?php echo get_year_link($year ); ?> "><?php echo $year; ?></a>
                       <ul>
       		<?php	$months = $wpdb->get_col("SELECT DISTINCT MONTH(post_date) FROM $wpdb->posts WHERE post_status = 'publish' AND post_type = 'post' AND YEAR(post_date) = '".$year."' ORDER BY post_date ASC");
       			foreach($months as $month) :
       		?>
       			<h4><li><a href="<?php echo get_month_link($year, $month); ?>"><?php echo date( 'F', mktime(0, 0, 0, $month) );?></a>
   
       		      <ul>
                                 <?php  $theids = $wpdb->get_results("SELECT ID, post_title FROM $wpdb->posts WHERE post_status = 'publish' AND post_type = 'post' AND MONTH(post_date)= '".$month."' AND YEAR(post_date) = '".$year."' ORDER BY post_date ASC");
                             		foreach ($theids as $theid):	
   
       			   ?>
                                       <h4 style= font-style:italic;><li><a href="http://www.kittywake.us/?p=<?php echo $theid->ID; ?>"><?php echo $theid->post_title; ?></a></li></h4>                            
   
       			<?php
       				endforeach; ?>
   
       			</ul>				  
   
       	                </li></h4>
   
                                <?php endforeach;?>
                     </ul>
   
               </li></h4>
       <?php endforeach; ?>
              </ul>
   
       			</div>
       </div>
       ```
   
 * The only problem I have with this is that if someone clicks on the month name
   the posts are in descending order while the listing is in ascending. You might
   want to change the code to all DESC so that you don’t have this happen. I’m still
   working on a solution.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Am I really that thick?](https://wordpress.org/support/topic/am-i-really-that-thick/)
 *  [kittywake](https://wordpress.org/support/users/kittywake/)
 * (@kittywake)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/am-i-really-that-thick/#post-1184640)
 * I think your layout looks great. And not difficult to do. I had done rudimentary
   HTML once before I switched to wordpress – so I’m definitely a beginner. But 
   it’s really easy to figure out. Just download a theme – a simple one will do 
   like cutline 2.2. Then I went through and deleted anything that mentioned “comments”,“
   authors”, etc until I had a very basic version of what I wanted. (Just delete
   one thing at a time and then look at the results before deleting the next item!)
   I have added things back in but still have a “blog” that is exactly what I want.
   Well, almost… [you can see it here](http://www.kittywake.us)
    The advantage of
   wordpress is the support and the tons of info on the web that will help you as
   your ideas grow.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [how to Reverse the Post Order in an archive page??](https://wordpress.org/support/topic/how-to-reverse-the-post-order-in-an-archive-page/)
 *  [kittywake](https://wordpress.org/support/users/kittywake/)
 * (@kittywake)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/how-to-reverse-the-post-order-in-an-archive-page/#post-934961)
 * I am really inexperienced with wordpress but I modified the cutline themes archive
   page to show my posts by year, month, and post title in ascending order. When
   someone clicks on say the Oct 25 link the navigation will show the next post 
   as Oct 29, and the previous post as Oct 24 which is correct. But if someone clicks
   on the month or year tab, the posts are in descending order. How do I get those
   to display in ascending order also?
 *     ```
       <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>			
   
       	<ul >
       <?php
       /**/
       $years = $wpdb->get_col("SELECT DISTINCT YEAR(post_date) FROM $wpdb->posts WHERE post_status = 'publish' AND post_type = 'post' ORDER BY post_date ASC");
       foreach($years as $year) :
       ?>
       	<h4><li><a href="<?php echo get_year_link($year); ?> "><?php echo $year; ?></a>
                       <ul>
       		<?php	$months = $wpdb->get_col("SELECT DISTINCT MONTH(post_date) FROM $wpdb->posts WHERE post_status = 'publish' AND post_type = 'post' AND YEAR(post_date) = '".$year."' ORDER BY post_date ASC");
       			foreach($months as $month) :
       		?>
       			<h4><li><a href="<?php echo get_month_link($year, $month); ?>"><?php echo date( 'F', mktime(0, 0, 0, $month) );?></a>
   
       		      <ul>
                                 <?php  $theids = $wpdb->get_results("SELECT ID, post_title FROM $wpdb->posts WHERE post_status = 'publish' AND post_type = 'post' AND MONTH(post_date)= '".$month."' AND YEAR(post_date) = '".$year."' ORDER BY post_date ASC");
                             		foreach ($theids as $theid):
   
       			   ?>
                                       <h4 style= font-style:italic;><li><a href="http://www.kittywake.us/?p=<?php echo $theid->ID; ?>"><?php echo $theid->post_title; ?></a></li></h4>
   
       			<?php
       				endforeach; ?>
   
       			</ul>	          
   
       	                </li></h4>
   
                                <?php endforeach;?>
                     </ul>
   
               </li></h4>
       <?php endforeach; ?>
              </ul>
   
       			</div>
       ```
   
 * Thank you for any help. I did try Shanes suggestion and modified the general-
   template.php file but it didn’t change anything.
 * Sue

Viewing 3 replies - 1 through 3 (of 3 total)