get_post_type_archive_link()
Retrieves the permalink for a post type archive.
Uses: get_post_type_object()
Hooks from the function
Return
String|false
. The post type archive permalink. False if the post type does not exist or does not have an archive.
Usage
get_post_type_archive_link( $post_type );
- $post_type(string) (required)
- Post type.
Notes
- Global. WP_Rewrite. $wp_rewrite WordPress rewrite component.
Changelog
Since 3.1.0 | Introduced. |
Since 4.5.0 | Support for posts was added. |