A WordPress-centric search engine for devs and theme authors



get_blog_permalink ›

Since3.0.0) 1.0
Deprecatedn/a
get_blog_permalink ( $blog_id, $post_id )
Parameters: (2)
  • (int) $blog_id ID of the source blog.
    Required: Yes
  • (int) $post_id ID of the desired post.
    Required: Yes
Returns:
  • (string) The post's permalink
Defined at:
Codex:
Change Log:
  • MU

Get the permalink for a post on another blog.



Source

function get_blog_permalink( $blog_id, $post_id ) {
	switch_to_blog( $blog_id );
	$link = get_permalink( $post_id );
	restore_current_blog();

	return $link;
}