get_blog_permalink()
Gets the permalink for a post on another blog.
No Hooks.
Return
String
. The post's permalink.
Usage
get_blog_permalink( $blog_id, $post_id );
- $blog_id(int) (required)
- ID of the source blog.
- $post_id(int) (required)
- ID of the desired post.
Changelog
Since 3.0.0 | Introduced. |
get_blog_permalink() get blog permalink code WP 6.6.2
function get_blog_permalink( $blog_id, $post_id ) { switch_to_blog( $blog_id ); $link = get_permalink( $post_id ); restore_current_blog(); return $link; }