Support » Fixing WordPress » problem with archives and themes

  • Resolved davidhildreth


    when i goto the address
    on my old theme i get all the posts for november 2006.
    all is swell and good, my htaccess file and permalink structure work together and all is well.

    but when i switch to my new theme my archives page is displayed. no posts come up, just the same page as archives.php

    my old theme does not have an archives.php if that is any help

Viewing 6 replies - 1 through 6 (of 6 total)
  • Some Q’s:

    1. Is the ‘old theme’ the one we’re seeing now on your site?

    2. Does the ‘new theme’ have an archive.php, and have you checked it to see if it is coded the same as archives.php?

    Note that if these themes are available to the public at large, it never hurts to mention the names. It’s always possible someone else is using one (or is just willing to check it out) and can add to the discussion.

    the old theme is Deichnetz
    the new theme is broad leaf

    deichnets has no archive.php and broad leaf’s is one i quickly made and is as follows:

    <?php get_header(); include (TEMPLATEPATH . “/data.php”);

    <div class=”content”>
    <?php wp_get_archives(‘type=monthly’); ?>

    <?php wp_list_cats(0, ”, ‘name’, ‘asc’, ”, 1, 0, 1, 1, 1, 1, 0,”,”,”,”,”) ?>

    <form id=”searchform” method=”get” action=”<?php echo $_SERVER[‘PHP_SELF’]; ?>”>
    <input type=”text” name=”s” id=”s” size=”20″ />
    <input class=”such” type=”submit” value=”<?php _e(‘Search’); ?>” />

    </div><!– close page –>
    <?php include (TEMPLATEPATH . “/bottom_single.php”); ?>
    <?php get_footer(); ?>

    Which explains the problem here. You want your archive.php for the Broad Leaf theme to duplicate in one way the theme’s index.php, meaning it should have The Loop within it, so that it can collect and display the posts for your archive links.

    its definatly a problem with my archives.php. i added an underscore to it, just to see what would happen, and links like work fine.

    although now my archives page (which has archives.php assigned as its template) doesnt work.

    The archives.php in a theme is usually a Page template. It’s meant to be assigned to a Page under Write > Page or Manage > Pages.

    ok, thanks for helping me out. i just needed a push in the right direction.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘problem with archives and themes’ is closed to new replies.