Log in

View Full Version : Wordpress blogs on forum home


parabat
11-07-2007, 11:24 PM
I'm hoping someone could assist me please.
I'm not PHP wise and want to display my latest wordpress blog entries on my forum home in a separate stats box. Much like this mod https://vborg.vbsupport.ru/showthread.php?t=156652 but using the wordpress blogs.
My wordpress (v2.2) and vBulletin (v3.6.4) have separate databases. Usually the forum users don't view the blogs on the homepage, hence me trying to display them in the forum so they become more visible.

I understand the general idea how to do it, but have no clue how to actually write the PHP code. I had a look at this code, but it's not opening a different database which has me stumped. I guess Wordpress also uses different database fields etc.

So any help at all would be greatly appreciated.

Thanx in advance

-PB

parabat
11-13-2007, 10:18 PM
*bump*

Any takers???

-PB

WhaLberg
11-14-2007, 03:31 AM
$db->select_db("wpdb");
$wpposts = $db->query_read("SELECT post_ID, post_title FROM wp_posts ORDER BY id DESC LIMIT 0,10");
while ($wppost = $db->fetch_array($wpposts))
{
echo '<a href="blogdir/?p=' . $wppost['post_ID'] . '">' . $wppost['post_title'] .'';
}


Will help you. But do some search on templates.