SHOW:
|
|
- or go back to the newest paste.
1 | <?php | |
2 | $network_query_posts = network_query_posts( array( 'post_type' => 'posts', 'posts_per_page' => 25 )); | |
3 | ||
4 | if( network_have_posts() ) { | |
5 | ||
6 | while( network_have_posts()) { | |
7 | network_the_post(); | |
8 | ||
9 | // Get the author id for the current post | |
10 | - | $the_author = network_get_the_author_id(); |
10 | + | $id = network_get_the_author_id(); |
11 | $author = get_userdata($id); | |
12 | ||
13 | // Get the permalink to the original post on the original blog | |
14 | $permalink = network_get_permalink(); | |
15 | ||
16 | // Get the post title | |
17 | $the_title = network_get_the_title(); | |
18 | ||
19 | // Echo some information and a link | |
20 | echo "<a href='" . $permalink . "'>" . $the_title . " by " . $author->user_nicename . "</a>"; | |
21 | } | |
22 | } | |
23 | ?> |