WordPress.org

Ready to get started?Download WordPress

Codex

Function Reference/get post type archive link

Contents

Description

Retrieve the permalink for a post type archive.

Usage

<?php get_post_type_archive_link$post_type ); ?>

Parameters

$post_type
(string) (required) Post type
Default: None


Return Values

(mixed) 
Archive URL for the requested post type. Will return false if $post_type does not exist or $post_type has no archive.

Examples

   <a href="<?php echo get_post_type_archive_link( 'movies' ); ?>">Movies Archive</a>

Notes

Change Log

Since: 3.1.0

Source File

get_post_type_archive_link() is located in wp-includes/link-template.php.

Related