I know you guys have seen hundreds if not thousands of 404 questions. I assure you I have done everything in my power. 1. updates permalinks 2. using /%post_id%/%postname%/ for structure 3. have been working on a clean 3.2 install 4. no plugins or extra functions
now not all archives are broken for example this
php wp_get_archives( array( 'type' => 'monthly' ) );
works fine, the resulting url structure is for example, site.com/blog/date/2011/06/
however this is not what i am trying to get to work what does not work is this
<ul class="archive-list">
<?php
$months = $wpdb->get_results("SELECT DISTINCT MONTH( post_date ) AS month , YEAR( post_date ) AS year, COUNT( id ) as post_count FROM $wpdb->posts WHERE post_status = 'publish' and post_date <= now( ) GROUP BY month , year ORDER BY post_date DESC");
foreach($months as $month) : ?>
<li><a href="<?php bloginfo('url') ?>/<?php echo $month->year; ?>/<?php echo date("m", mktime(0, 0, 0, $month->month, 1, $month->year)) ?>"><?php echo date("F", mktime(0, 0, 0, $month->month, 1, $month->year)) ?> <?php echo $month->year ?> - <span class="archive-list-small"><?php echo $month->post_count; if ($month->post_count> 1 ) { echo " posts"; } else { echo " post"; }?></span></a></li>
<?php endforeach; ?>
</ul>
the resulting url structure is site.com/blog/2011/06/ , no date, even if i add date that does not change anything, i still get 404, yes i have updated my permalinks and put it to default if that makes a difference and back and back to default and over the menu to mars as well
to make things worse i get 404 on the second page of the regular
wp_get_archives( array( 'type' => 'monthly' ) );
can someone please test this out, one more thing the quarried items are custom posts types