WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] Archives missing in action

[Resolved] Archives missing in action

  • When I try to find my archives by category or date, they’re just GONE. I’m not sure where to begin to try to fix them.

    Details: running wordpress 2.0.3
    I’ve got Date & Name based permalinks on.
    And this is the error I’m getting when I click on one of my categories:

    Parse error: parse error, unexpected T_STRING in /home/thiswoma/public_html/wp-content/themes/plaintxtblog/index.php on line 1

    This is my site: http://www.thiswomanswork.com

    I’ve dug around in all the various places where that parse error could be happening and CANNOT FIND IT.

    Any help would be MUCH appreciated it! People rely on my archives a lot and are complaining.

    Thanks!!!

Viewing 12 replies - 1 through 12 (of 12 total)
  • Could you provide the contents of your index.php file? It’s quite difficult to guess what’s going on without anything to look at. 🙂

    /home/thiswoma/public_html/wp-content/themes/plaintxtblog/index.php

    It looks like this skipped the directory wp/

    wp/wp-content/….

    I also notice there was an errors.
    http://validator.w3.org/check?uri=http%3A%2F%2Fwww.thiswomanswork.com%2Fall-archives
    fix theses and it might work.

    Thanks Dan. Those are new errors from my blogads (I’ve had trouble with blogads before and fixed it so the site would validate then they switched the code on me). I will fix them but the problem was happening before with the old validating code up, too.

    There is no wp directory because I installed it right under my public_html directory.

    And ZMang, here’s the index.php file.

    <?xml version=”1.0″ encoding=”utf-8″?>
    <!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Strict//EN”
    “http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd”>
    <html xmlns=”http://www.w3.org/1999/xhtml” xml:lang=”en” lang=”en”>
    <?php
    get_header();
    get_sidebar();
    ?>

    <div id=”content” class=”narrowcolumn”>

    <?php if (have_posts()) : ?>
    <?php while (have_posts()) : the_post(); ?>

    <div id=”post-<?php the_ID(); ?>” class=”post”>
    <div class=”post-header”>
    <h2 class=”post-title”>” title=”Permalink to <?php the_title(); ?>” rel=”bookmark”><?php the_title(); ?></h2>
    <h3 class=”post-date”><?php the_time(‘d-M-y’) ?></h3>
    </div><!– END POST-HEADER –>
    <div class=”post-entry”>
    <?php the_content(); ?>
    <?php link_pages(‘<p style=”font-weight:bold;”>Pages: ‘, ”, ‘number’); ?>
    </div><!– END POST-ENTRY –>
    <div class=”post-metadata”>
    <p class=”post-footer”>Filed in <?php the_category(‘ • ‘) ?></div> | ” rel=”permalink” title=”Permalink to <?php the_title(); ?>”>Permalink | <?php comments_popup_link(‘Comments (0) »’, ‘Comments (1) »’, ‘Comments (%) »’); ?> <?php edit_post_link(‘Revise’, ‘ | ‘, ”); ?>
    </div><!– END POST-METADATA –>
    <!– <?php trackback_rdf(); ?> –>
    </div><!– END POST –>

    <?php endwhile; ?>

    <div class=”navigation”>
    <div class=”alignleft”><?php next_posts_link(‘« Older posts’) ?></div>
    <div class=”alignright”><?php previous_posts_link(‘Newer posts »’) ?></div>
    <div class=”middle”>/” title=”Home: <?php bloginfo(‘name’); ?>”>Home</div>
    </div><!– END NAVIGATION –>

    <?php else : ?>
    <?php /* INCLUDE FOR ERROR TEXT */ include (TEMPLATEPATH . ‘/errortext.php’); ?>
    <?php endif; ?>

    </div><!– END CONTENT –>

    <?php get_footer(); ?>

    Could you show us how your category.php and archive.php look like? Because according to the template hierarchy, it should be looking up those first (and thus there shouldn’t be a call to index.php to cause such problems in the first place).

    Sorry for the continuous demands.

    Have you look here
    http://codex.wordpress.org/User:Skippy/Common_PHP_Errors

    parse error, unexpected T_STRING
    this usually means you forgot a quotation mark; but it can also mean you forgot a semi-colon at the end of a previous line

    Hi Danny, I did see that but haven’t found any missing punctuation (doesn’t mean I didn’t miss it). ZMAng, that’s what’s bothering me, too — I couldn’t figure out which “index.php” it needed to call.

    Here’s the archives.php:

    [moderated: HUGE chunk of code snipped. Consider using a pastebin type service, or putting the code in a .txt file, and linking to it from here instead]

    I don’t have a category.php

    Yes, my .htaccess file is:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    # END WordPress
    RewriteRule ^archives/ archives/index.php [QSA]

    I really appreciate the two of you taking time to help me figure this out!!

    Also, sorry about the enormous code. I’ve followed the mod’s suggestion and the archives.php file is now here:
    http://thiswomanswork.com/archives.txt

    bump

    From what you’re telling me, what is happening is that you do not have “archive.php” (what you linked to is actually “archives.php”, note the “s” which is normally used as a page template for an overall archives page) nor “category.php” – which is why WordPress is calling for “index.php” instead (based on template hierarchy).

    I presume that either you accidentally deleted archive.php, or if it never existed, you modified your index.php such that it’s no longer suitable for your archives. I’m leaning towards the former since most themes come packaged with archive.php.

    It could be that none of these are correct though. But as first step, I suggest creating an archive.php file to see how it goes. Try plonking in the one from the default WordPress theme.

    Thanks! I ended up reinstalling bits and pieces of the theme and now the archives are there but looking wonky so I’m on to a new set of problems to fix. I appreciate everyone’s time here!

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘[Resolved] Archives missing in action’ is closed to new replies.