http://wange.im/diy-wordpress-comment-style.html

function mytheme_comment($comment, $args, $depth) {
$GLOBALS['comment'] = $comment; ?> <article>
<div class="cell hoverable reply" id="comment-<?php comment_ID(); ?>">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody><tr>
<td valign="top" width="48">
<a href="http://forum.tianming.me/index.php/user/info/2" class="profile_link" title="hurner">
<img alt="hurner medium avatar" class="medium_avatar" src="http://forum.tianming.me/uploads/avatar/default.jpg">
</a>
</td>
<td width="10"></td>
<td valign="top" width="auto">
<div class="fr">
<small class="snow">
#3 -
4 天前
<a href="#reply" onclick="replyOne('hurner');"><img align="absmiddle" alt="Reply_button" border="0" id="mention_button" class="clickable mention_button" data-mention="hurner" src="http://forum.tianming.me/static/images/reply_button.png"></a>
<?php comment_reply_link(array_merge( $args, array('depth' => $depth, 'max_depth' => $args['max_depth']))) ?>
</small>
</div>
<a href="http://forum.tianming.me/index.php/user/info/2" class="dark startbbs profile_link" title="hurner">hurner</a>
<span class="snow">&nbsp;&nbsp;
<div class="sep5"></div>
<div class="content reply_content"><?php comment_text() ?></div> </span></td>
</tr>
</tbody></table>
</div>
</article> <?php
}

如下调用:

                <?php
//Gather comments for a specific page/post
$comments = get_comments(array(
'post_id' => $post->ID,
'status' => 'approve' //Change this to the type of comments to be displayed
)); //Display the list of comments
wp_list_comments(array(
'per_page' => 10, //Allow comment pagination
'reverse_top_level' => false, //Show the latest comments at the top of the list
'callback'=> 'mytheme_comment',
), $comments);
?>

原始的评论输入框,如下comment_reply_link使用:

		<div class="commen-form">
<?php
$args = array(
'id_form' => 'commentform',
);
comment_form($args);
?>
</div>

  

wordpres 自定义comment样式的更多相关文章

  1. Django 中自定义 Admin 样式与功能

    目录 自定义 Admin 样式与功能 1 页面修改中文 1.1 语言设置为中文 1.2 应用管理设置为中文 1.3 数据库表设置为中文 1.4 数据库表字段名称修改为中文 2 修改后台样式 2.1 安 ...

  2. Siteserver-stl:searchOutput(搜索结果)自定义显示样式

    stl:searchOutput 自定义显示样式 自定义搜索提交表单需要在<stl:searchOutput>中嵌入显示搜索结果的标签,必须包含的标签 有<stl:pageConte ...

  3. jQuery自定义滚动条样式插件mCustomScrollbar

    如果你构建一个很有特色和创意的网页,那么肯定希望定义网页中的滚动条样式,这方面的 jQuery 插件比较不错的,有两个:jScrollPane 和 mCustomScrollbar. 关于 jScro ...

  4. 自定义plain 样式的 tableview,模拟器上不显示分割线,真机上却显示分割线.

    一, 经历 1> 自定义plain 样式的 tableview,模拟器上不显示分割线,真机上却显示cell 下面的分割线. 2> 尝试使用表格的separatorStyle属性,尝试失败. ...

  5. Winform自定义窗体样式,实现标题栏可灵活自定义

    最近在编写C/S结构应用程序时,感觉窗体的标题栏样式太死板了,标题文字不能更改大小.颜色.字体等,按钮不能隐藏等问题,在网上也查找了许多相关的资料,没有找到合适的解决方案,发现许多人也在寻求这个问题, ...

  6. WPF 自定义滚动条样式

    先看一下效果: 先分析一下滚动条有哪儿几部分组成: 滚动条总共有五部分组成: 两端的箭头按钮,实际类型为RepeatButton Thumb 两端的空白,实际也是RepeatButton 最后就是Th ...

  7. Android设置选项开发及自定义Preference样式

    一个完整的Android应用程序都应该提供选项(或者叫偏好设置等等)让用户对APP的表现形式能够进行设置,比如说是否加入用户体验计划,或者是否自动升级.定时提醒.开启自启动.后台运行等等.提供一个好的 ...

  8. Android: 自定义Tab样式,一种简单的方式。

    之前看到过论坛里已经有人发过自定义Tab样式的帖子,感觉有些复杂了,这里分享个简单的方法. 1.制作4个9patch的tab样式,可参考android默认的资源 tab_unselected.9.pn ...

  9. 如何使用XE2及更高版本中提供的自定义皮肤(样式)功能

    源:如何使用XE2及更高版本中提供的自定义皮肤(样式)功能 1. 制作样式文件: 点击 XE2+ 的 IDE 菜单上的 Tools-->Bitmap Style Designer, 打开设计器. ...

随机推荐

  1. seajs hello world

    http://localhost/seajs/index.html <!doctype html> <head> <title>Hello Seajs</ti ...

  2. 二、CoreAnimation之寄宿图详解

    在之前的图层树中我们知道,可以使用CALayer对象创建一些有背景颜色的图层,其实使用CALayer,不仅可以利用其展示背景颜色,还可以展示图片.而这些展示内容,其实就是CALayer的寄宿图.这一节 ...

  3. Mybatis #和$的区别

    1.#将传入的数据当成一个字符串,会自动加上双引号.如 oder by  #{id}  ,那么解析后为oder by  “id” 2.$对传入的数据不进行操作,直接显示原值.如oder by  ${i ...

  4. IBM x3850 x5 服务器 安装 Windows Server 2008

    一.硬件需求 一个8G以上的U盘 二.软件需求 1.Windwos Server 2008镜像 2.系统启动盘制作工具Ultraiso 3.IBM ServerGuide引导镜像 三.制作及安装步骤 ...

  5. 什么是shell

    Shell本身是一个用C语言编写的程序,它是用户使用Linux的桥梁.Shell既是一种命令语言,又是一种程序设计语言.作为命令语言,它交互式地解释和执行用户输入的命令:作为程序设计语言,它定义了各种 ...

  6. OSI七层模型及TCP/IP四层模型

    1)  OSI七层模型及TCP/IP四层模型 OSI七层模型:是国际标准化组织(ISO)制定的一个用于计算机或通信系统间互联的标准体系.它是一个七层的.抽象的模型,不仅包括一系列抽象的术语或概念,也包 ...

  7. 使用python解析Json字符串-获取Json字符串关键字

    import json data = { "statusCode": 0, "data": { ", "height": &quo ...

  8. EL函数以及自定义标签的应用

    一.EL函数(调用普通类的静态方法) 编写步骤(自定义EL函数的编写步骤即自定义标签的编写步骤): ①编写一个普通的java类,提供一个静态方法,功能自定,例如下: package cn.wzbril ...

  9. Velocity 语法(转)

    一.基本语法 1."#"用来标识Velocity的脚本语句,包括#set.#if .#else.#end.#foreach.#end.#iinclude.#parse.#macro ...

  10. 【MongoDB:第二天】基本操作

    接上一篇博客: http://www.cnblogs.com/xiaoit/p/3867573.html 1:插入新的数据 db.person.insert({"uid" : 12 ...