‘Wordpress’ 分类的存档

因为我的博客程序放在wordpress文件下面的不是放在网站根目录下的。所以就要转移啊!把WordPress放到单独它单独目录下的程序如下:1、新建一个用来存放WordPress核心文件的新文件夹(本例以/wordpress示范)。2、进入选项(options)面板。3、找到WordPress address (URL)(中文用户请查找”WordPress 地址(URL)“)...

Read more »

2009年8月5日16:46 | 没有评论
分类: 小技巧
标签:

给wordpress博客加上时间,其实很简单,简单的几行代码就行了,你可以在你想要加的地方加入就可以了. <?php     $hourdiff = "0"; /* time difference, ex: "-8" or "8" */     $timeadjust = ($hourdiff * 60 * 60);     $melbdate = date(&q...

Read more »

2009年8月5日16:41 | 没有评论
分类: 小技巧
标签:

相关的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 | 没有评论
分类: 主题
标签: , ,

一、减少查询数据库。 询数据库也许会花费比较多的时间,而有些东西是确定的,我们不需要查询数据库就知道应该是什么的。 <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" /> <meta...

Read more »

2009年8月5日16:09 | 没有评论
分类: 小技巧
标签:

改写404页面这主题 有一个小秘密,就是404页面了,里面还有MG12那个咸湿佬的图片和网站链接。建议大家改一下404页面,很不客气的把他的图片和链接给该了,当然了footer的MG12的链接,还是留着的,做人还是要厚道的。这也是国际惯例了吧!表示对作者的谢意!我把Google的404页面代码也加上去了,代码如下: <script ...

Read more »

2009年8月5日15:46 | 2 条评论
分类: 主题
标签: , , ,
页面 3 到 41234