Reputation: 8487
I've got a Wordpress theme with a archive.php
file, but it doesn't contain any link directly to it.
How can I link directly to this page?
I've tried the following, but it only retrieves a list of the months, not a URL:
<?php wp_get_archives(); ?>
Upvotes: 0
Views: 359
Reputation: 261
archive.php
will used to render author, date, category, tag and taxonomy depends on how you set up your theme.
For instance, if you create link to author page <a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>"><?php the_author(); ?></a>
, it will use archive.php
to render the content unless you have author.php
in your theme.
Please see https://developer.wordpress.org/files/2014/10/template-hierarchy.png for more information.
Upvotes: 1