水煮鱼的微信机器人不错,http://blog.wpjam.com/project/weixin-robot/
但是这个微信机器人如果你用ngg,那么显示图片会有点问题,做如下修改,会显示图片。
if(!function_exists('get_post_first_image')){ function get_post_first_image($post_content){ global $post, $wpdb; preg_match('@\\no images were found
@i', do_shortcode($post_content), $matches); if($matches){ $picture_id = $matches[1]; $sql="SELECT * FROM {$wpdb->prefix}ngg_pictures p left join {$wpdb->prefix}ngg_gallery g on p.galleryid=g.gid WHERE p.pid = ". intval( $picture_id ) . " ORDER BY sortorder, pid ASC"; $ngg_image = $wpdb->get_row( $sql ); return get_site_url()."/".$ngg_image->path."/thumbs/thumbs_".$ngg_image->filename; }else{ return false; } } }
有问题请留言。