wpseek.com
A WordPress-centric search engine for devs and theme authors



get_blog_permalink › WordPress Function

Since
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

Gets 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;
}