Support » Themes and Templates » How to skin/integrate archives.php?

Viewing 11 replies - 1 through 11 (of 11 total)
  • I looked but couldn’t understand everything. I don’t have a page.php or any other template to use as a base, and if I use a clean archive.php, I just get the contents in a white page, no integration with my site.

    I think the problem might be that my entire site is run from index.php and not using header.php, footer.php or sidebar.php. (Someone made/modified the theme for me and isn’t available any more.)

    Any suggestions on how to create an archive page that fits the website?

    What you need to do is create an archives.php and insert it into the theme files.

    Use your page.php code for your archives.php template, removing the call to the content and inserting either your archives plugin function (or however you want your categories to display).

    Be sure you add this to the top of your archives.php file, before the code starts in your template:

    Template Name: Archives

    Then you’ll create a page called archives, and select the page template “archives”.

    Hope that’s more helpful. 🙂

    It seemed to help a little. Take a look now: At the May 2007 archives. The problem is that it’s all plain. I don’t know how to make it look like the rest of the site with the archived posts only appearing inside the content area, much like how the category pages are.

    Also, I created a Page with the archive.php file from the default theme (and removed the headers and footers) and got this:

    Just putting the archive.php file into the theme’s folder seemed to at least get the correct month’s posts to show up.

    Any further instructions?

    archive.php and archiveS.php are two very different things!

    I’ve only used archive.php.

    From what you’ve said, you want archives.php, not archive.

    If you want something like this:

    It’s done with a plugin and the archives.php file. You can also code the archives.php to display categories, dates, months, there are a lot of options (check the template tags for different ways to list posts).

    Your archives.php should look just like your pages do if you’ve implemented the same structure from the page.php template.

    I don’t have a page.php file among my theme files, everything seems to be run from index.php.

    I didn’t have the archive.php file in there either, or the archives.php file.

    Right now, I’m trying to figure out why my archives are showing up on a seemingly seperate page and design and how I make it follow the design of the rest of the site, which is run from index.php.

    You can certainly use your index.php as the base for archives.php, you’ll just need to revise the file to suit an archives template. It will provide the structure of your design. 🙂

    You’ll need to create the archives.php and add it to your theme files as I mentioned in that initial reply.

    Alright, I’ll give it a shot tomorrow. Getting late here atm. 🙂 In the meanwhile, could you tell me more about how to revise the index.php file before I save it as archives.php? Like what sections (in general, since the file controls my header and sidebars and the main content area) to remove and what to add?

    Fisrt of all you need to understand the theme system used in WP. Otherwise all your attempt to “customize” will end up in the way your archive looks now.

    If you had only the index.php – that’s a good file to start with. But you need to edit ONLY the Loop part of it, and leave all the other refrences (get_header, get_sidebar etc.) untouched)!
    First you save as… archive, page, single, whatever – and then edit the Loop.
    Take a look at the default theme’s file: take the Loop from those files and create your owns with the design of your theme.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘How to skin/integrate archives.php?’ is closed to new replies.