Support » Themes and Templates » Linking to generic archives page

  • I’m writing a theme and an trying to generate a link to a generic archives page (i.e. archives.php). By default this is when you have pretty links enabled.

    The problem being that a user can change this URL under permalink options. So how do I get that value to dynamically generate a link to the archives page should a user decide to change that permalink option? Obviously, if a user has chosen to change the URL at which archives can be accessed I want the theme to respect that.

    Any ideas? I’m coming up blank, as are searches.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Why not use the template tag, wp_get_archives()?

    Because that displays a list of dates. The setup I have is I’m using a home.php template file for the homepage. This doesn’t contain a typical list of posts. Hence I want to provide a link to a page listing posts, newest first, from every category.

    I know, based on the template hierarchy, that I can use either archive.php or index.php to do this, but I’m struggling to dynamically generate a link to this page based on the user specified pretty link option.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Linking to generic archives page’ is closed to new replies.