The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

[resolved] Archives missing in action (13 posts)

  1. Moominmama
    Posted 10 years ago #

    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.


  2. ZMAng
    Posted 10 years ago #

    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. :)

  3. dannybcastillo
    Posted 10 years ago #


    It looks like this skipped the directory wp/


    I also notice there was an errors.
    fix theses and it might work.

  4. Moominmama
    Posted 10 years ago #

    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"
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

    <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(); ?>

  5. ZMAng
    Posted 10 years ago #

    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.

  6. dannybcastillo
    Posted 10 years ago #

    Have you look here

    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

  7. Moominmama
    Posted 10 years ago #

    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

  8. dannybcastillo
    Posted 10 years ago #

  9. Moominmama
    Posted 10 years ago #

    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]

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

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

  10. Moominmama
    Posted 10 years ago #

    Also, sorry about the enormous code. I've followed the mod's suggestion and the archives.php file is now here:

  11. Moominmama
    Posted 10 years ago #


  12. ZMAng
    Posted 10 years ago #

    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.

  13. Moominmama
    Posted 10 years ago #

    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!

Topic Closed

This topic has been closed to new replies.

About this Topic