文章标签 ‘代码’

相关的10篇文章 <ul> <?php $tags = wp_get_post_tags($post->ID); if ($tags) { $first_tag = $tags[0]->term_id; $args=array( 'tag__in' => array($first_tag), 'post__not_in' => array($post->ID), 'showposts'=>10, 'caller_get_posts'=>...

Read more »

2009年8月5日16:39 | 2 条评论
分类: 主题

随机的10篇文章 <?php $rand_posts = get_posts('numberposts=10&orderby=rand'); foreach( $rand_posts as $post ) : ?> <li><a href="&lt;?php the_permalink(); ?&gt;"> < ?php the_title(); ?> </a></li> <?php endforeach; ?>特注明此...

Read more »

2009年8月5日16:37 | 2 条评论
分类: 主题

最新的10篇评论 <?php global $wpdb; $sql = "SELECT DISTINCT ID, post_title, post_password, comment_ID, comment_post_ID, comment_author, comment_date_gmt, comment_approved, comment_type,comment_author_url, SUBSTRING(comment_content,1,30) AS com_excerpt FROM $wpdb->comments LEFT OUTER ...

Read more »

2009年8月5日16:34 | 1 条评论
分类: 主题

留言数最多的10篇文章 <ul class="most_comments"> <?php $result = $wpdb->get_results("SELECT comment_count,ID,post_title FROM $wpdb->posts ORDER BY comment_count DESC LIMIT 0 , 10"); foreach ($result as $post) { setup_postdata($post); $postid = $post->ID; ...

Read more »

2009年8月5日16:31 | 没有评论
分类: 主题

最新10篇文章 <?php global $wpdb; $sql = "SELECT DISTINCT ID, post_title, post_password, comment_ID, comment_post_ID, comment_author, comment_date_gmt, comment_approved, comment_type,comment_author_url, SUBSTRING(comment_content,1,30) AS com_excerpt FROM $wpdb->comments LEFT OUTER JO...

Read more »

2009年8月5日16:27 | 没有评论
分类: 主题

我也修改了很多的主题,对主题中所写的一些数据库查询语句也有了一些认识!找出来给那些要修改主题的人!WordPress基本模板文件 style.css : CSS(样式表)文件 index.php : 主页模板 archive.php : Archive/Category模板 404.php : 404页面,错误页模板 comments.php : 留言/回复模板 ...

Read more »

2009年8月5日16:23 | 没有评论
分类: 主题
标签: , ,