BEFORE
<?php if (have_posts()) : while (have_posts()) : the_post(); ? >
ADD THIS
<?php switch_to_blog(2); ?>
Define the BLOG ID -> The number in ()
Define how many transaction you need
<?php $recent = new WP_Query("showposts=3"); ?>
-- full code --
<?php
if(have_posts()) :
$recent = new WP_Query("showposts=3");
while($recent->have_posts()) : $recent->the_post();
?>
2009年10月2日
WordPress MU: search or display different blogs content in Master Blog
2009年9月16日
Customize how many results
in Settings -> Reading
You can set up general amount in
Blog pages show at most 10 post
Otherwise, if you want Customize amountin certain page
insert this code befor Loop
<?php query_posts('showposts=3'); ?>
Search: Define searching post_type
Find The Loop and insert the code before
// ----- define searching type ----- //
<?php query_posts('post_type=post'); ?>
訂閱:
文章 (Atom)