Forums

Change get_archives target page? (7 posts)

  1. georgeloch
    Member
    Posted 5 years ago #

    When I use the get_archives() tag it defaults to the index page of the site and I would like to direct it to a different page. Is this possible?

  2. tsguitar
    Member
    Posted 5 years ago #

    What do you mean? It should list all of your archive pages. Do you mean that it defaults to the template defined on the index page of the site?

  3. georgeloch
    Member
    Posted 5 years ago #

    Yeah basically. The site is a mostly just pages with no blog elements but there is a single blog page that I wanted all of the blog interaction to go through. Does that makes sense?

    -gl

  4. tsguitar
    Member
    Posted 5 years ago #

    No, I'm still not getting it. Anyhow, do you have a file called archives.php in your theme folder? If not, copy index.php and rename it archives.php. Any changes you make to archives.php should modify the way those archive pages display. You'll should put this at the top of the archive template:
    /*
    Template Name: Archives Template
    */

    That will make it easier to spot in the list of theme files when you go to Presentation >> Theme Editor. Does that answer your question?

  5. georgeloch
    Member
    Posted 5 years ago #

    Thanks. I actually have a template already called 'blog' which I assume will give me the same effect. Is 'Archives.php' some kind of default? The blog page has this template assigned and it has all of the blog elements associated with it. All of the other pages(including the main page) have the blog elements stripped out. This is because the blog is secondary to the site.

    -gl

  6. tsguitar
    Member
    Posted 5 years ago #

    That's the default. I don't know if there's a way to change that. I'd suggest just copying your template called blog and title it archives.php since that's working the way you want it to.

  7. georgeloch
    Member
    Posted 5 years ago #

    Ok. I'll try that.

Topic Closed

This topic has been closed to new replies.

About this Topic