Hi there, I have a request about a wordpress feature id like to add to one of my sites. I have alot of blogs that are related in content, and i would like to setup a page that displays the top 5 posts for all the sites. Ie. first site 1 2 3 4 5 Second site 1 2 3 4 5 Third site 1 2 3 4 5 I had a one line bit of code from somewhere a while back and it worked perfectly. But, of course cus i want it now i cant find it anywhere.. So if anyone has any idea what i could use to achieve this feature. I would surely appreciate any help. thx alot for the help in advance
are all sites sharing the same database? if so it would relatively easy to query it, how are you ranking the posts?
no each site has there own db i just want to pull the latest 5 posts from each site i choose. It was only a one line bit of code, i had. That would display rss feed of last 5 posts from as many sites i want.. But i lost the code somewhere..
Create widgetized zones on your home page, and then insert a RSS widget with your settings in each zone. I can probably do this for you if you want.
I use the plugin WP-O-Matic as my RSS aggregator. You can set it up to import the RSS feeds of your other sites and then automatically create a post and assign a category to them. If you want to display the 5 latest posts then you will need to put the following code somewhere on your site <ul> <?php $my_query = new WP_Query('showposts=5&category_name=Website2'); while ($my_query->have_posts()) : $my_query->the_post(); ?> <li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li> <?php endwhile; ?> </ul> Code (markup): You just need to fill in the category name and repeat it 5 times for the 5 categories. If you don't want these posts appearing on your front page you can exclude them by modifying the loop and adding the parameter &category_name=-Website2,-Website4 etc. Code (markup): that should work