WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] problem with archives and themes (7 posts)

  1. davidhildreth
    Member
    Posted 7 years ago #

    when i goto the address http://www.davidloveslife.com/2006/11/
    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

  2. Kafkaesqui

    Posted 7 years ago #

    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.

  3. davidhildreth
    Member
    Posted 7 years ago #

    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">
    <h2>Monthly</h2>
    <?php wp_get_archives('type=monthly'); ?>

    <h2>Category</h2>
    <?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'); ?>" />
    </form>

    </div>
    </div><!-- close page -->
    <?php include (TEMPLATEPATH . "/bottom_single.php"); ?>
    <?php get_footer(); ?>

  4. Kafkaesqui

    Posted 7 years ago #

    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.

  5. davidhildreth
    Member
    Posted 7 years ago #

    its definatly a problem with my archives.php. i added an underscore to it, just to see what would happen, and links like http://www.davidloveslife.com/2006/11/ work fine.

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

  6. Kafkaesqui

    Posted 7 years ago #

    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.

  7. davidhildreth
    Member
    Posted 7 years ago #

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

Topic Closed

This topic has been closed to new replies.

About this Topic