get_post_type_archive_link() WP 1.0
Retrieves the permalink for a post type archive.
Works based on: 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. |
Code of get_post_type_archive_link() get post type archive link WP 5.6
Related Functions
From tag: Archives (of posts)
More from tag: Link (URL)
- admin_url()
- attachment_url_to_postid()
- build_query()
- comment_link()
- content_url()
- get_comments_link()
- get_comments_pagenum_link()
- get_edit_post_link()
- get_edit_term_link()
- get_home_url()
- get_next_comments_link()
- get_post_embed_url()
- get_post_permalink()
More from category: Custom Types
- add_post_type_support()
- get_post_type()
- get_post_type_object()
- get_post_types()
- get_the_post_type_description()