Quantcast
Channel: 互联第一站 » WordPress知识
Browsing all 9 articles
Browse latest View live

WordPress主题模板修改基本知识

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

View Article



wordpress主题–相关文章代码

?Download download.txt1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 <ul> < ?php $tags = wp_get_post_tags($post->ID); if ($tags) { $first_tag = $tags[0]->term_id; $args=array(...

View Article

wordpress主题–随机文章代码

?Download download.txt1 2 3 4 5 6 7 8 < ?php $rand_posts = get_posts('numberposts=8&orderby=rand'); foreach( $rand_posts as $post ) : ?> <li><a href="<?php the_permalink();...

View Article

wordpress主题–最新文章代码

?Download download.txt1 2 3 4 5 6 7 8 9 10 11 < ?php $limit = get_option('posts_per_page'); $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; query_posts('showposts=' . $limit=7 ....

View Article

wordpress主题–最热文章代码

?Download download.txt1 2 3 4 5 6 7 8 9 10 11 12 <ul class="most-comments"> < ?php $result = $wpdb->get_results("SELECT comment_count,ID,post_title FROM $wpdb->posts ORDER BY...

View Article


wordpress主题–最新评论代码

?Download download.txt1 2 3 4 5 6 7 8 9 10 11 12 13 14 < ?php global $wpdb; $sql = "SELECT DISTINCT ID, post_title, post_password, comment_ID, comment_post_ID, comment_author, comment_date_gmt,...

View Article

评论页添加删除和垃圾评论链接

你是否经常需要对评论进行修改、删除或标记为垃圾评论。默认情况下, WordPress只在评论页上显示“编辑”链接(使用edit_comment_link ( )函数) ,而不能显示“删除”或“垃圾评论”链接。如果你想需要的话,那就让我们来手动添加,是评论页添加删除和垃圾评论链接! 首先,我们必须建立一个函数。下面的代码粘贴在您的functions.php文件: ?Download...

View Article

wordpress 主题之下拉列表导航栏

看到别人的导航栏是下拉列表式的,就只有一个感觉,羡慕。但是我又不想单单为了这个功能去用上一个插件,怎么办呢?自己动手呗!可是在Google上找了很多的导航栏样式,都很漂亮,但漂亮的代价也是沉重的!为了漂亮而付出速度那是不行的!所以找来找去,终于找到了简单的导航栏方法! 哈哈!其实我想要得就是想在导航栏上加上分类下拉式导航,当然想要加其他的方法都是一样的,就是li里面套li啊,不过对我来说没什么意义!...

View Article


Mysql Error:1018:can’t read dir of ‘./dbname’

mysql问题: mysql> use dbname; Database changed mysql> show tables; ERROR 1018 (HY000): Can't read dir of './dbname/' (errno: 13) 原因: 这个库目录的属主不对,使用chown修改之,表信息都正常了。 此时可以#ls -l 或 #ll...

View Article

Browsing all 9 articles
Browse latest View live




Latest Images