wordpress 无法 评论 提示undefined
自己主机的话,查看评论代码,如果这方面有一定了解,可以自己修改代码,但我估计你这么问了,应该不是很清楚。
那么我建议你保存wp-content 下的plugins ,themes uploads 这3个文件夹,和根目录下的wp-config.php文件,然后删掉其他的文件夹以及文件,再安装一次wordpress,不会很复杂,再把刚要保存的文件夹放到原来的位置去,替换都是可以的。
然后进入后台配置插件和主题吧,我相信到了这一步你应该了解了。
纯手打,会给分么~~~
wordpress文章评论时出现undefined,然后就无法评论了
进入管理后台,点击左侧菜单“设置”--“讨论”2在右侧页面“默认文章设置”里去掉“允许他人在新文章上发表评论 ”前的勾关闭某篇文章的评论1进入到管理后台,点击“所有文章”,将鼠标移至想要编辑文章下方,就会出现一个菜单,点击“快速编辑”2去掉右侧“允许评论”前的勾,然后保存,该篇文章就不能进行评论了。
wordpress无法搜索中文
其实这个问题跟中文标签无法连接是一样的。
修改wp-includes/rewrite.php这是网上最常见的方法,原理是,让WordPress在对其他内容使用Permalink的时候,对tag不使用,而使用链接2的QueryString 模式发送中文编码:function get_tag_permastruct() {if (isset($this->tag_structure)) {return $this->tag_structure;}if (empty($this->permalink_structure)) { //-----this line need change------$this->tag_structure = '';return false;}把第5行改为if (!empty($this->permalink_structure)) {
wordpress模板评论功能怎么被禁了
先判断下是否登录,然后获取当前用户对象,然后获取当前用户对象的信息,需要哪些用哪些:if(is_user_logged_in()){$current_user = wp_get_current_user(); /** * @example Safe usage: $current_user = wp_get_current_user(); * if ( !($current_user instanceof WP_User) ) * return; */ echo 'Username: ' . $current_user->user_login . ''; echo 'User email: ' . $current_user->user_email . ''; echo 'User first name: ' . $current_user->user_firstname . ''; echo 'User last name: ' . $current_user->user_lastname . ''; echo 'User display name: ' . $current_user->display_name . ''; echo 'User ID: ' . $current_user->ID . ''; }截图 看看吧账号管理这只能自己看到,当然发布评论后,大家都能看到昵称了。
如何实现wordpress评论回复邮件通知功能
展开全部 有以下3种方法来实现“免插件仅代码实现WordPress评论回复邮件提醒”,都是把代码加到主题里的functions.php中的最后一个 ?> 即可。
第一种:所有回复都发邮件通知使用前,请确定你的主机是否支持 mail() 函数。
/* comment_mail_notify v1.0 by willin kan. (所有回复都发邮件) */function comment_mail_notify($comment_id) { $comment = get_comment($comment_id); $parent_id = $comment->comment_parent ? $comment->comment_parent : ''; $spam_confirmed = $comment->comment_approved; if (($parent_id != '') && ($spam_confirmed != 'spam')) { $wp_email = 'no-reply@' . preg_replace('#^www.#', '', strtolower($_SERVER['SERVER_NAME'])); //e-mail 发出点, no-reply 可改为可用的 e-mail. $to = trim(get_comment($parent_id)->comment_author_email); $subject = '您在 [' . get_option("blogname") . '] 的留言有了回复'; $message = ' ' . trim(get_comment($parent_id)->comment_author) . ', 您好! 您曾在《' . get_the_title($comment->comment_post_ID) . '》的留言:' . trim(get_comment($parent_id)->comment_content) . ' ' . trim($comment->comment_author) . ' 给您的回复:' . trim($comment->comment_content) . ' 您可以点击 查看回复完整内容 欢迎再度光临 ' . get_option('blogname') . ' (此邮件由系统自动发送,请勿回复.) '; $from = "From: "" . get_option('blogname') . "" "; $headers = "$fromnContent-Type: text/html; charset=" . get_option('blog_charset') . "n"; wp_mail( $to, $subject, $message, $headers ); //echo 'mail to ', $to, ' ' , $subject, $message; // for testing }}add_action('comment_post', 'comment_mail_notify');// -- END - 第二种:让访客自己选择是否邮件通知在评论框下方显示一个勾选框,让评论人自己决定是否接收邮件通知。
不过要注意的是,具体的#comment_mail_notify 需要你自己定义css以符合你的主题样式。
function comment_mail_notify($comment_id) { $admin_notify = '1'; // admin 要不要收回复通知 ( '1'=要 ; '0'=不要 ) $admin_email = get_bloginfo ('admin_email'); // $admin_email 可改为你指定的 e-mail. $comment = get_comment($comment_id); $comment_author_email = trim($comment->comment_author_email); $parent_id = $comment->comment_parent ? $comment->comment_parent : ''; global $wpdb; if ($wpdb->query("Describe {$wpdb->comments} comment_mail_notify") == '') $wpdb->query("ALTER TABLE {$wpdb->comments} ADD COLUMN comment_mail_notify TINYINT NOT NULL DEFAULT 0;"); if (($comment_author_email != $admin_email && isset($_POST['comment_mail_notify'])) || ($comment_author_email == $admin_email && $admin_notify == '1')) $wpdb->query("UPDATE {$wpdb->comments} SET comment_mail_notify='1' WHERE comment_ID='$comment_id'"); $notify = $parent_id ? get_comment($parent_id)->comment_mail_notify : '0'; $spam_confirmed = $comment->comment_approved; if ($parent_id != '' && $spam_confirmed != 'spam' && $notify == '1') { $wp_email = 'no-reply@' . preg_replace('#^www.#', '', strtolower($_SERVER['SERVER_NAME'])); // e-mail 发出点, no-reply 可改为可用的 e-mail. $to = trim(get_comment($parent_id)->comment_author_email); $subject = '您在 [' . get_option("blogname") . '] 的留言有了回复'; $message = ' ' . trim(get_comment($parent_id)->comment_author) . ', 您好! 您曾在《' . get_the_title($comment->comment_post_ID) . '》的留言:' . trim(get_comment($parent_id)->comment_content) . ' ' . trim($comment->comment_author) . ' 给您的回复:' . trim($comment->comment_content) . ' 您可以点击查看回复的完整内容 还要再度光临 ' . get_option('blogname') . ' (此邮件由系统自动发送,请勿回复.) '; $from = "From: "" . get_option('blogname') . "" "; $headers = "$fromnContent-Type: text/html; charset=" . get_option('blog_charset') . "n"; wp_mail( $to, $subject, $message, $headers ); //echo 'mail to ', $to, ' ' , $subject, $message; // for testing }}add_action('comment_post', 'comment_mail_...
如何让wordpress列表页只显示文章的部分内容
们在浏览别人的blog时,一般都是只显示文章的部份内容,只有再点开来才能看到文章的全部,这样可以在主页面上显示更多的文章,也比较美观。
那么在wordpress里如何做到显示文章的部分内容呢?很多人都以为是使用wordpress的插件来实现此功能,其实并不用这样。
默认情况下,在wordpress的首页会显示文章的全部内容,若这样就会造成首页的页面过于冗长,不方便访问者浏览文章。
Wordpress自带这种只显示文章的部份内容的功能,这样在同一个页面即可实现显示很多文章且浏览很方便,方法很简单,具体操作如下:1.点击进入”添加新文章\Add New”页面 2.在文章需要分开的地方,点击”插入More标签”,这样在more以上的部分在主页浏览的时候显示,一下部分不再显示 图示如何插入More如图所示,光标放在想要显示的内容之后,然后显示More这个地方,这样就完成了让wordpress只显示文章的部分内容。
3.若想在主页浏览时显示完more以上的文字后再显示”阅读全文”,通过点击这个超链接即可阅读全文的话,打开wordpress\wp-content\themes\default\index.php,找到the_content()函数,输入如下内容:the_content(”阅读全文”),那么在主页浏览时就会在文章最后显示“阅读全文”的超链接。
*Source From Network Posts Related to 如何让wordpress只显示文章的部分内容How todisplay a colorful Tag cloud更改Oracle数据库结构TNS:protocol adapter notloadable应用软件体系结构模型的探讨Windows Mobile开发资源介绍收藏Share and Enjoy Retweet thisShare on Facebook Share with Addthis
wordpress后台媒体库搜索不能用了
baidu.hiphotos.baidu.com/zhidao/wh%3D450%2C600/sign=38e336cb3aadcbef01617602999f02eb/8b13632762d0f70379ce9ad303fa513d2697c545.com/zhidao/pic/item/8b13632762d0f70379ce9ad303fa513d2697c545.jpg" target="_blank" title="点击查看大图" class="ikqb_img_alink"> FZ辰 | 发布于2017-10-03 18:07 评论
转载请注明出处51数据库 » wordpress无法评论
恨我别用后悔药