WordPress.org

Codex

Function Reference/get blog post

Contents

Description

Get a blog post from any site on the network.

Usage

 <?php $blog_post get_blog_post$blog_id$post_id ); ?> 

Parameters

$blog_id
(integer) (required) ID of the blog.
Default: None
$post_id
(integer) (required) ID of the post you are looking for.
Default: None

Example

From site/blog id 3, get the post with id 6.
<?php
$post_6 
get_blog_post3);
echo 
$post_6->post_title;
?>

Returns

Returns a WP_Post object, or null on failure. See get_post for more information.

Source File

get_blog_post() is located in wp-includes/ms-functions.php.


See also index of Function Reference and index of Template Tags.
This page is marked as incomplete. You can help Codex by expanding it.