最新 WordPress 版本 3.0 正式版近期发布。自动更新过后,原有插件、主题基本适应,兼容性还好。WP3的新特性还在慢慢体会中。
这里列出两个升级3.0可能会遇到的小问题以及解决办法。
1、一个部分主题可能会遇到的小问题
在以前WP版本中,各主题作者可能习惯于使用 $tableposts(文章数据库表名称) 和 $tablecomments(评论数据库表名称) 两个全局变量来SQL查询数据库。新版本中不再有这两者的定义。因此部分主题中会出现文章列表、评论列表为空的现象。我目前再用的主题 Lifedit 就有这个问题。
其实这不是个新问题,在WPMU中也是没有 $tableposts 和 $tablecomments 的定义的,有尝试过将WP主题应用到WPMU的早就遇到过这个问题,当然解决方法也早就出来了:
$tableposts ==> $wpdb.posts
$tablecomments ==> $wpdb.comments
用右侧的替换掉原来的两个就可以了,$wpdb 是一直存在的定义。
2、这个应该算是WP3.0的Bug了
新版中,在文章编辑页面,将默认以HTML模式编辑文章,而且…而且虽然”HTML”的左侧还是存在着”Visual”字样的Tab标签,可是…可是任你疯狂点击,它自岿然不动(郁闷吧?无语吧?气愤吧?砸坏键盘吧,摔掉鼠标吧,电脑也扔了吧…淡定啊…哥来救你..)。
- 连上Ftp或者其它什么什么的,检查一下 your-wp-install-path/wp-includes/js/tinymce/ 目录,wp-tinymce.js.gz 是否健在?少了什么了么?跟安装包里的东西对比一下,少的补上
- 编辑 wp-config.php ,在 /* That’s all, stop editing! Happy blogging. */ 的上面加入一行:
define ('CONCATENATE_SCRIPTS', false); /* That’s all, stop editing! Happy blogging. */
Done! 现在可以好好反虐你的编辑器了…
补充一下:这个问题貌似是因为自动升级时 wp-config.php 没有更新造成的,对比一下旧的配置文件,手动按照新的 wp-config-sample.php 模板编辑一下 wp-config.php 也能解决~
/**#@+
* Authentication Unique Keys and Salts.
*
* Change these to different unique phrases!
* You can generate these using the {@link https://api.wordpress.org/secret-key/1.1/salt/ WordPress.org secret-key service}
* You can change these at any point in time to invalidate all existing cookies. This will force all users to have to log in again.
*
* @since 2.6.0
*/
define('AUTH_KEY', 'put your unique phrase here');
define('SECURE_AUTH_KEY', 'put your unique phrase here');
define('LOGGED_IN_KEY', 'put your unique phrase here');
define('NONCE_KEY', 'put your unique phrase here');
+ define('AUTH_SALT', 'put your unique phrase here');
+ define('SECURE_AUTH_SALT', 'put your unique phrase here');
+ define('LOGGED_IN_SALT', 'put your unique phrase here');
+ define('NONCE_SALT', 'put your unique phrase here');
+ /**
+ * For developers: WordPress debugging mode.
+ *
+ * Change this to true to enable the display of notices during development.
+ * It is strongly recommended that plugin and theme developers use WP_DEBUG
+ * in their development environments.
+ */
+ define('WP_DEBUG', false);

我一直都上传不到wp-tinymce.js.gz 这个文件!
呃 求top按钮的代码分享
@Mini Dragon
其实你可以用chrome的审查元素看到的。。。
#scroll {
bottom: 66px;
clear: both;
left: 50%;
margin: 0px 0px 0px 461px;
position: fixed;
z-index: 99;
}
我只用firefox啦
firefox也有问题么?
我升级到3.0后,从单用户开启多用户后,遇到一个奇怪的问题:
通过windows live writer仍然可以更新旧用户的blog。但没办法添加新用户的博客账号上去,已经打开了xml-rpc,还是不行。
有人遇到过同样的情况吗?
我欢乐地来回访了,照你说的改了然后华丽丽地崩溃,另外我很想知道到底怎么实现原模板内个首页显示摘要……好吧我知道你碰上我这种技术白很头疼的,烦请回答我的问题吧TAT
崩溃?不至于吧。。。另外,那个摘要是手动加more标签的结果。
这样说你能懂不?。。。加Gtalk吧,我邮件你知道的。。。