Gets the permalink for a post on another blog.
$blog_idintrequired
$post_idintrequired
function get_blog_permalink( $blog_id, $post_id ) {
switch_to_blog( $blog_id );
$link = get_permalink( $post_id );
restore_current_blog();
return $link;
}
| Version | Description |
|---|---|
| MU (3.0.0) 1.0 | Introduced. |
© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/get_blog_permalink