1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Wordpress Archive Issues

Discussion in 'HTML & Website Design' started by MelogKnaj, Sep 14, 2008.

  1. #1
    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.
     
    If someone posts a solution, use the "Best Answer" link in their post to pick it as the best answer.
    MelogKnaj, Sep 14, 2008 IP
  2. seanyboyyo

    seanyboyyo Banned

    Messages:
    1,161
    Likes Received:
    16
    Best Answers:
    0
    Trophy Points:
    0
    #2
    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
     
    seanyboyyo, Sep 14, 2008 Set Best Answer IP
    1 person likes this.
  3. Dodger

    Dodger Peon

    Messages:
    1,494
    Likes Received:
    60
    Best Answers:
    0
    Trophy Points:
    0
    #3
    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 &raquo;'); ?>
    
    </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):
     
    Dodger, Sep 14, 2008 Set Best Answer IP
    1 person likes this.
  4. MelogKnaj

    MelogKnaj Guest

    Best Answers:
    0
    #4
    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 :(.
     
    MelogKnaj, Sep 15, 2008 Set Best Answer IP
  5. Dodger

    Dodger Peon

    Messages:
    1,494
    Likes Received:
    60
    Best Answers:
    0
    Trophy Points:
    0
    #5
    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.
     
    Dodger, Sep 15, 2008 Set Best Answer IP
  6. MelogKnaj

    MelogKnaj Guest

    Best Answers:
    0
    #6
    I still can't seem to figure out what is going on with this, any help would be amazing.
     
    MelogKnaj, Sep 21, 2008 Set Best Answer IP
  7. Dodger

    Dodger Peon

    Messages:
    1,494
    Likes Received:
    60
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Post your archive.php file from your current theme and the .htaccess file. Will take a look at it.
     
    Dodger, Sep 21, 2008 Set Best Answer IP
  8. MelogKnaj

    MelogKnaj Guest

    Best Answers:
    0
    #8
    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):
     
    MelogKnaj, Sep 21, 2008 Set Best Answer IP