我最近使用自定义帖子类型在我的网站上实施了一个博客。当我激活评论时,如果我已登录,评论会很顺利,但我会退出并测试评论,它会将我带到SMTP错误页面,其中显示为:
SMTP -> get_lines(): $data was ""
SMTP -> get_lines(): $str is "220 mx.google.com ESMTP u1sm13031122oee.8 - gsmtp "
SMTP -> get_lines(): $data is "220 mx.google.com ESMTP u1sm13031122oee.8 - gsmtp "
SMTP -> FROM SERVER:220 mx.google.com ESMTP u1sm13031122oee.8 - gsmtp
另外还有五十多行。
尝试将电子邮件发送到非“本地”的地址时似乎出错。
自定义帖子类型的代码如下:
<?php
function my_custom_post_articles() {
$labels = array(
'name' => _x( 'Articles', 'post type general name' ),
'singular_name' => _x( 'Article', 'post type singular name' ),
'add_new' => _x( 'Add New', 'book' ),
'add_new_item' => __( 'Add New Article' ),
'edit_item' => __( 'Edit Article' ),
'new_item' => __( 'New Article' ),
'all_items' => __( 'All Articles' ),
'view_item' => __( 'View Article' ),
'search_items' => __( 'Search Articles' ),
'not_found' => __( 'No Articles found' ),
'not_found_in_trash' => __( 'No Articles found in the Trash' ),
'parent_item_colon' => '',
'menu_name' => 'Articles'
);
$args = array(
'labels' => $labels,
'description' => 'Holds our articles and article specific data',
'public' => true,
'menu_position' => 5,
'supports' => array( 'title', 'editor', 'thumbnail', 'excerpt', 'comments' ),
'has_archive' => true,
);
register_post_type( 'articles', $args );
flush_rewrite_rules();
}
add_action( 'init', 'my_custom_post_articles' );
?>