get_post_permalink() WP 1.0
Retrieves the permalink for a post of a custom post type.
Basis of: get_permalink()
1 time = 0.000578s = slow | 50000 times = 5s = fast
Hooks from the function
Return
String/WP_Error. The post permalink.
Usage
get_post_permalink( $id, $leavename, $sample );
- $id(int/WP_Post)
- Post ID or post object.
Default: global $post - $leavename(true/false)
- Whether to keep post name.
Default: false - $sample(true/false)
- Is it a sample permalink.
Default: false
Notes
- Global. WP_Rewrite. $wp_rewrite WordPress rewrite component.
Changelog
Since 3.0.0 | Introduced. |
Code of get_post_permalink() get post permalink WP 5.6
Related Functions
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_type_archive_link()
More from category: Custom Types
- add_post_type_support()
- get_post_type()
- get_post_type_object()
- get_post_types()
- get_the_post_type_description()