0
我试图调整默认的Wordpress评论表单,以便它与Foundation框架一起工作。自定义Wordpress评论表
这是我使用的内部functions.php
迄今为止代码:我正在寻找一种方式来定制以同样的方式,因为一些其他输入提交按钮
function pondera_comment_form() {
$comment_args = array(
'title_reply'=>'Have something to say?',
'fields' => apply_filters('comment_form_default_fields',
array(
'author' => '<div class="small-12 large-6 columns">' . '<label for="author">' . __('First Name') . '</label> ' . ($req ? '<span>*</span>' : '') . '<input id="author" name="author" type="text" value="' . esc_attr($commenter['comment_author']) . '" size="30"' . $aria_req . ' /></div>',
'email' => '<div class="small-12 large-6 columns">' . '<label for="email">' . __('Email Address') . '</label> ' . ($req ? '<span>*</span>' : '') . '<input id="email" name="email" type="text" value="' . esc_attr( $commenter['comment_author_email']) . '" size="30"' . $aria_req . ' />'.'</div>',
'url' => '')
),
'comment_field' =>
'<div class="small-12 large-12 columns">' . '<label for="comment">' . __('Comments') . '</label>' . '<textarea id="comment" name="comment" cols="45" rows="8" aria-required="true"></textarea>' . '</div>',
'comment_notes_before' => '',
'comment_notes_after' => '',
);
comment_form($comment_args);
}
,但我不确定如何做到这一点。我想把它包装在这个<div class="small-12 columns>
以及添加一个.button
类到输入本身。
我也想为WP生成的<h3>
标题做同样的事情。
没有你在你的主题的comments.php文件?如果是这样,那么你可以通过添加任何你想要的按钮来直接修改表单,所以它的风格就像基础。我一直在修改评论表单。然而这将取决于你的主题是如何设置的。 – sulfureous
我从头开始创建主题,所以我几乎可以使用任何方法。我有一个comments.php文件,目前这个概述显示了评论本身,然后有一个'<?php pondera_comment_form(); ?>引用来显示表单。 (这是我总是这样做的。)然后我使用这个函数来调整功能。我没有意识到你可以从头开始编写代码,是否有资源页面显示如何正确执行此操作? – Sheixt
我会建议您检查白板框架。 http://whiteboardframework.com/写这个主题的人有一个非常好的comments.php模板,它显示了我建议的方法,或许这是一个很好的例子,让我们知道它是否让你更接近你想要的位置与此同在。祝你好运。 – sulfureous