定制wordpress左边的sidebar
我的18ie.com 采用wordpress作为blog, 左边是一个长长的sidebar。如果右边的正文很长,左边的sidebar就显得很空,比较难看,也浪费屏幕的空间。
于是,我修改了wordpress/wp-content/themes/你的风格/sidebar.php,找个合适的地方,加入以下语句:
$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 ("%s",$np->post_title);
效果,看本站 www.18ie.com/wordpress 的左侧。
飞涛软件工作室
2006-10-07 15:09:24
Warning: MkDir failed (Disc quota exceeded) in /z1/18ie/public_html/count/html/count.php on line 12
Warning: fopen("/z1/18ie/public_html/count/html/2008_07/06_every.txt", "a+") - No such file or directory in /z1/18ie/public_html/count/html/count.php on line 42
Warning: Supplied argument is not a valid File-Handle resource in /z1/18ie/public_html/count/html/count.php on line 43
Warning: Supplied argument is not a valid File-Handle resource in /z1/18ie/public_html/count/html/count.php on line 46
Warning: Supplied argument is not a valid File-Handle resource in /z1/18ie/public_html/count/html/count.php on line 48
Warning: Supplied argument is not a valid File-Handle resource in /z1/18ie/public_html/count/html/count.php on line 49