The wordpress archives on http://cod4source.com are working ever since I switched to a new theme. Now all the archives just link back to the homepage. +Reps and $1 just as an incentive for anybody that can tell me how to fix it or point me in the right direction.
Looks to me like there is an issue with the template that redirects all archive links back to the homepage. You might need to dig deep into the coding and take a look at that one (index.html) good luck and if u have questions feel free to pm me. --sean
Actually, the links are okay. They are pointing correctly and the url of the pages are as they should be. The problem is in the archive.php file of the theme. Not sure what the problem is. I am a little tired right now and cannot see straight. But here is the code for that theme if somebody wants to look at it: <?php get_header(); ?> <?php get_sidebar(); ?> <div class="text"> <?php if (have_posts()) : ?> <?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?> <?php /* If this is a category archive */ if (is_category()) { ?> <h2 class="pagetitle">Archive for the ‘<?php echo single_cat_title(); ?>’ Category</h2> <?php /* If this is a daily archive */ } elseif (is_day()) { ?> <h2 class="pagetitle">Archive for <?php the_time('F jS, Y'); ?></h2> <?php /* If this is a monthly archive */ } elseif (is_month()) { ?> <h2 class="pagetitle">Archive for <?php the_time('F, Y'); ?></h2> <?php /* If this is a yearly archive */ } elseif (is_year()) { ?> <h2 class="pagetitle">Archive for <?php the_time('Y'); ?></h2> <?php /* If this is an author archive */ } elseif (is_author()) { ?> <h2 class="pagetitle">Author Archive</h2> <?php /* If this is a paged archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?> <h2 class="pagetitle">Blog Archives</h2> <?php } ?> <?php while (have_posts()) : the_post(); ?> <div class="post"> <h1 class="title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h1> <div class="date">Posted by <?php the_author(); ?> on <?php the_time('M-j-Y'); ?> under <?php the_category(', '); ?> </div> <div class="cover"> <div class="entry"> <?php the_content('Read the rest of this entry »'); ?> </div> </div> <div class="postinfo"> <div class="comms"><?php comments_popup_link('Add comments', '1 comment', '% comments'); ?></div> </div> </div> <?php endwhile; ?> <?php else : ?> <h1 class="title">Not Found</h1> <p>Sorry, but you are looking for something that isn't here.</p> <?php endif; ?> </div> <?php get_footer(); ?> Code (markup):
Thanks for the help, reps for you both. It definitely looks like it's in the archive.php, I just can't seem to figure out where .
I was also thinking that maybe the .htaccess file has something to do with it, or the permalink settings ??? To check if the statements are getting processed inside the archive.php file, throw in some variable or text echoes to follow the progress. If the echo statements do not show up, then you know where the process is failing.
The archive.php hasn't changed since you posted it. I messed around with it but nothing I did seemed to help so I put it back the way it has. Here is the .htaccess. <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> <IfModule mod_security.c> <Files async-upload.php> SecFilterEngine Off SecFilterScanPOST Off </Files> </IfModule> Code (markup):