How to skin/integrate archives.php? (12 posts)

  1. kheldon
    Posted 8 years ago #

    Hello folks,

    I'm having trouble making my archives page integrate with the rest of my design. I want the arhives to pop up in the content area using the same design as the rest of the page.

    How do I go about doing this?

    http://www.mmo-gamer.com/ is the site and http://www.mmo-gamer.com/?m=200705 is how the archive page looks like right now.

  2. Funkphenomenon
    Posted 8 years ago #

  3. kheldon
    Posted 8 years ago #

    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?

  4. intricateartist
    Posted 8 years ago #

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

  5. kheldon
    Posted 8 years ago #

    It seemed to help a little. Take a look now: http://www.mmo-gamer.com/?m=200705 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: http://www.mmo-gamer.com/?page_id=109

    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?

  6. moshu
    Posted 8 years ago #

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

  7. kheldon
    Posted 8 years ago #

    I've only used archive.php.

  8. intricateartist
    Posted 8 years ago #

    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.

  9. kheldon
    Posted 8 years ago #

    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.

  10. intricateartist
    Posted 8 years ago #

    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.

  11. kheldon
    Posted 8 years ago #

    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?

  12. moshu
    Posted 8 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic