Merhaba

Forumda da aradım hep değişik örneklemeler mevcut yada kendi hatalarımdan bir türlü yapamadım,

Bir blog var ve bu konuları (Wordpress) bir .php sayfasına çekmek istiyorum ;

<?php

$sayi = 10;
$sayi2 = 80;

$link = mysql_connect('localhost', 'dbuser', 'dbpass')
    or die('Could not connect: ' . mysql_error());
mysql_select_db('dbname') or die('Could not select database');

$query = "SELECT * FROM wp_posts WHERE published = 'on' ORDER BY id DESC LIMIT " . $sayi;
$result = mysql_query($query) or die('Query failed: ' . mysql_error());

while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {

$line['post_title'] = (strlen($line['post_title']) > $sayi2) ? substr($line['post_title'], 0, $sayi2) . '...' : $line['post_title'];
$line['post_title'] = (strlen($line['post_title']) > 25) ? substr($line['post_title'], 0, 25) . '...' : $line['post_title'];

echo '<span style="font-size: 11px;">&raquo <a href="#" onclick="javascript:op_pop(' .  $line['id'] . ');"><b>' . $line['post_title'] . '</b></a> | <i>' . $line['date'] . '</i><br />' . $line['post_title'] . '<br /><br /></span>';


}

mysql_free_result($result);

?>
Fakat çalışmadı , bu tarz birşey uygulamadım.

Bu konuda temiz bir kodu belirtecek varsa memnun olurum.Yukarıdaki kodda pop-up link mevcut fakat o olmasa iyi olur direkt ayrı sayfada blog'un o konusu açılması lazım ve ben sadeec başlıkları göstermek istiyorum başka .php sayfamda.