The setup is as follows:
I have a static intro page, where I would like to show the latest entries from two WP powered blogs currently on my server. I have used the code from http://codex.wordpress.org/Creating_a_Static_Front_Page. Because I need to call from two different wp-config.php files, I modified the require_once() command to include(path/to/wp-config.php). This is shown in the code below. However what has happened is that I get the latest entry from only one blog - you can see this here: http://www.idlanzakaria.com/home.php
I am very sure the correction is very minor, but I am a total PHP novice, and am totally stuck. I'd be grateful for any and all pointers.
Here is the code I used:
<?php
$how_many=5; //How many posts do you want to show
include("/home/idlanzak/public_html/conversed/wp-config.php"); // Change this for your path to wp-config.php file ?>
<ol id="whats-new">
<?
$news=$wpdb->get_results("SELECT ID,post_title FROM $wpdb->posts
WHERE post_status= \"publish\" ORDER BY 'ID' DESC LIMIT ".$how_many);
foreach($news as $np){
printf ("
}?>
<?php
$how_many=5; //How many posts do you want to show
include("/home/idlanzak/public_html/wordpress/wp-config.php"); // Change this for your path to wp-config.php file ?>
<ol id="whats-new">
<?
$news=$wpdb->get_results("SELECT ID,post_title FROM $wpdb->posts
WHERE post_status= \"publish\" ORDER BY 'ID' DESC LIMIT ".$how_many);
foreach($news as $np){
print ("
echo get_permalink($np->ID);
print ("\">$np->post_title
} ?>