Articles tagged with: WordPress
WordPress »
新版的WordPress自带了插件自动升级的功能。每次安装的插件有了新版本,只要点一个链接,就自动完成下载、解压、禁用插件、升级、重新启用这一系列步骤。常方便。但有些空间选择升级时会提示需要主机的FTP用户名和密码。
这个blog安装在linux系统上,第一感觉可能是权限的问题,反正是内部的服务器,随便折腾,就都设置成777。结果还是不行,就仔细地跟进去查了一下,发现问题在一个叫做“get_filesystem_method”的函数上。找到这样一个解释:
(FTP) it only uses this when it detects that files it creates have the wrong owner name
一下得到了提醒,可能是因为跑PHP进程的用户名和WP文件夹的所有者不同。于是用chown命令更改了文件所有者,命令用法如下:
chown -R www *
就是把目录下所有文件和文件夹的所有者改成叫做www的用户。这样再去尝试WP的自动升级,一键升级就能顺利进行了。
WordPress »
WordPress 如何 SEO, 虽然内容为王,但是,每天花一小点时间进行 SEO ,却会使你事半功倍,建站更轻松。 WordPress 有利于 SEO 的良好的永久链接结构,
WordPress »
当我们制作 WordPress 插件的时候,首先必须要了解 WordPress 主循环和全局变量。这样,我们在制作插件的时候,就可以知道可以访问哪个变量,不能访问哪个变量。
WordPress »
WordPress有丰富的插件、主题,成功广大博主建博客利器,WordPress博客是由MySQL提供支持的,在博客的写作过程中,有时不得不牵扯到一些对MySQL数据库的操作,虽然,插件和代码的修改也能帮我们解决问题,但是,这也是治标不治本的丰富,随意,合理的利用phpMyAdmin来进行数据的操作的十分有必要的。
WordPress »
I have been looking for WP templates on Wordpress.org until I found this site:wprex.com, “which provides a number of finest quality and innovative WP themes”, in their words. But I suppose that, despite it does not have as many themes as Wordpress.org has, it provides more elaborate and more Multifunction templates as they can. In addition, the more detailed Specification helps me to find my favor themes a lot. So I recommend this wordpress themes site. By the way, it is wholly free and Easy to download wordpress templates without …
WordPress, 原创 »
使用Twitter tools 插件,可以将最新的Post发送到Twitter上,确实很方便。由于我的永久链接(permalink)格式为
/archives/%postname%.html
文章链接中含有文章标题,当标题为中文的时候不太美观,所以用cos_slug_translator这个插件将中文标题转换为英文。但是我用Twitter Tools的时候就出现了问题:发送到Twitter上的链接依然含有中文,访问的话就是404错误。
WordPress »
转自芒果
为 WordPress 添加统计代码通常采用在 footer.php 文件直接嵌入的方式。一旦主题更换,就需要重新插入统计代码,比较麻烦。
以芒果使用的 Google Analytics 为例,可以将其以插件的形式嵌入源代码,从而避免修改模板文件。
WordPress »
WordPress 在 2.8 版本之后,增加了几个新的 link 标签 rel 属性,例如:
<link rel="index" title="Sino Blog" href="http://www.sinoblog.org" />
<link rel="start" title="Hello World" href="http://www.sinoblog.org/2007/09/hello-world.html" />
<link rel="prev" title="QQ邮箱支持域名邮箱个性化邮件服务" href="http://www.sinoblog.org/2009/09/qq-domainmail.html" />
如果要去掉 WordPress 博客 header 部分的这些 rel 属性,可以通过修改主题支持函数(functions.php)来实现,规则是:
remove_action( $tag, $function_to_add, $priority, $accepted_args );
例如,要去掉下面的这些 link 标签:
<link rel="alternate" type="application/rss+xml" title="WP Engineer RSS Feed" href="http://www.aliyoga.com/yujia/feed/" />
<link rel="alternate" type="application/atom+xml" title="WP Engineer Atom Feed" href="http://www.aliyoga.com/yujia/feed/atom/" />
<link rel="pingback" href="http://www.aliyoga.com/yujia/xmlrpc.php" />
<link rel="EditURI" type="application/rsd+xml" title="RSD" href="http://www.aliyoga.com/xmlrpc.php?rsd" />
<link rel="index" title="WP Engineer" href="http://www.aliyoga.com" />
<link rel="start" title="Use WordPress 2.7 Offline" href="http://www.aliyoga.com/shop/" />
<link rel="prev" title="Recents Drafts All Authors" href="http://www.aliyoga.com/bbs/" />
分别对应的 remove_action 代码是:
remove_action( ‘wp_head’, ‘feed_links_extra’, 3 ); // Display the links to the …
原创, 网站优化 »
原创文章,转载请声明。
由于DIV+CSS结构使网页打开速度更快,如今,大多数网站都采用这种方式编写html。但与此同时,很少人注意到css文件的大小,以及其效率。很多页面引用了多个css文件,并且css代码冗余严重。这无疑会造成页面加载速度缓慢。