Show wordpress posts outside of the blog
- by way2project
I have two wordpress blogs on my site and now I want to show the posts of categories of both blogs on the home page. I am using the following code.
<?php require($_SERVER['DOCUMENT_ROOT'] . '/projects/wp-load.php');
query_posts('cat=9& showposts=8'); if (have_posts()) : while (have_posts()) :
the_post(); ?>
<ul><li>
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php
$shorttitle4 = substr(the_title('','',FALSE),0,25)."...";
echo $shorttitle4;
?></a>
</li></ul>
<?php endwhile; else: echo "no posts"; endif; ?>
<?php wp_reset_query(); ?>
One of my blogs is placed in the "projects" folder and another one is placed in "technology folder". but this code is showing the posts only from projects blogs if I changed the folder in as "technology" in the above code. I think this is because of wp-load.php file. Can you help me?
Thanks