Posts filed under 'WordPress'

Google SEO’s Starter Guide

Google发布Google搜索引擎优化初学者指南. 里面对一些基本的搜索引擎优化(SEO)都涉及到了,包括页面标题、Meta元标签、URL的结构优化、网站导航、网站内容和服务、链接锚文本(Anchor Text)、图片优化、网站推广等。

对照了自己的博客,发现还是有些方面没做优化。比如我的网页Meta元标签就没设置、网站导航也欠佳等。 这其中有些是由于Wordpress默认主题的缘故,还有些是Godaddy免费主机空间的限制。

指南最后还介绍了结合使用Google网站管理员工具、Google Analytic和Google Website Optimizer来管理网站,可以说是个人网站管理的必备工具了。后两者现在还没用过,统计我现在用的是Yahoo的。就网站管理员工具而言,百度暂时还没有提供类似工具,其他如Yahoo Site Explorer和Live Search网站管理员工具的功能现在都还不及Google的。

Add comment January 19th, 2009

Don’t Show Some Kind of Category Post in Wordpress Home Page

The Phoenix TV Program《开卷八分钟》willl broadcast every work day. That means this blog will update the video very frequently, so maybe the home page of this blog will full of the television video. Becasue the television program is only collected for myself interesting, so I don’t want the posts belong to ‘开卷八分钟’ category show in home page.

Following is the instruction about how to do this:
1.Sign in your wordpress blog and go to admin console, click “Design“–>”Theme Editor“, then open ‘index.php’ file.
2.Insert the source code according to following image, the first line is in the index.php before, and the the second line is what you need to insert. then Save the file.
3.In the step 2, the ‘X’ is the category ID number that you don’t want show in home page. Click “Manage“–>”Categories“, then click the the category. In the browser’s address bar, you can see cat_ID=X. The number is the ID of the category and fill it in the place of the step 2.

4 comments January 9th, 2009

How to Add Google Friend Connect in Wordpress Blog

google friend connect can add social feature into your blog. You can get the description and introducation about it here in http://www.google.com/friendconnect/.

Following steps are how to add google friend connect into your wordpres blog.
1. sign in with your google account in above URL.
2. And then click ‘Set up a new site’ to add google friend connect into your blog.
3. After that go through a series of process to add google friend connet. There are two files canvas.html and rpc_replay.html need to upload to root directory of your blog. Set up the members gadget including size, color. click ‘Generate code’ to generate html code, copy the code.
4. sign in your wordpress blog, then go to WordPress Admin -> Design -> Widgets. Add a ‘Text’ widget, then input the widget title such as ‘ Google Friend Connect’ and paste the html code into the widget. then save all changes.

After all that, go back your blog website, you can see google friend connect widget into your sidebar of your blog.

8 comments January 8th, 2009

Wordpress默认主题瞎改

在”近期对博客的修改“中,提到了接下来对主题陆续要改的方面。

首先修改了页脚,不像以前那么乱了。打开单篇博文时也出现侧边栏,便于浏览者导航。希望以后能在最上面一行加上”主页”,”About Me”的按钮,这样就更方便了。

昨天晚上加上了favicon,其实这个比较简单,大家可以参考Wordpress官方文档”Create and Install a Favicon“。另外对于Favicon图标,有个很不错的网站可以在线生成Favicon图标

大家看的出来我的Favicon是什么图片嘛?可能原始图片质量太差了,看得不是很清晰啊!是马尔代夫的星月岛,有好心人精于图片处理的,能帮我做个清晰的嘛!

对于怎样在最近留言中显示留言内容,这个应该要改\wordpress\wp-includes\widgets.php文件中的function wp_widget_recent_comments了,估计通过修改主题文件没法办到,不过我暂时还没改成功,呵呵!有成功的麻烦不吝赐教哦。

另外还有两个插件应该也是很不错的。一个列出与当前博文内容相关的其他博文,叫Wordpress Related Posts。另外一个插件就是WP-PostViews,可以显示博文被浏览的次数,这样可以在侧边栏显示最受欢迎的博文。

Ok! That’s all.

7 comments December 11th, 2008

怎么在Wordpress的留言模板中去掉EMail输入选项

今天”苦瓜”网友问我怎么使文章后面留言模板中去掉EMail输入框。回来后在本地Wordpress环境下测试了下,应该基本能满足”苦瓜”的需求吧。

更多的测试没来得及做,有Wordpress大牛发现有什么不妥的,敬请指正。

好了,下面是详细修改过程:
先找到主题下的comments.php文件(注:本人用的是Wordpress的默认主题),把下面一段语句删掉。这段语句是显示EMail输入框。

这样虽然EMail输入框没有了,但留言的时候系统还会检测到没有输入EMail。接下来打开\wordpress\wp-comments-post.php文件。把下面的代码行注释掉相关语句。
“if ( get_option(’require_name_email’) && !$user->ID ) {
if ( /*6 > strlen($comment_author_email) ||*/ ” “== $comment_author )
wp_die( __(’Error: please fill the required fields (name, email).’) );
/*elseif ( !is_email($comment_author_email))
wp_die( __(’Error: please enter a valid email address.’) );*/
}”
这样发表留言的时候系统应该就不会检测是否输入了EMail地址了。

在本地环境下测试通过,但每次留言的时候都提示”Your comment is awaiting moderation”. 不知是我的本地Wordpress设置问题还是修改代码的缘故。

最后要说的是,大家可以在本地环境搭建个Wordpress系统,想怎么折腾都行。

慢慢熟悉Wordpress系统了,自己估计也能开发主题和插件了。呵呵。。

3 comments December 9th, 2008

近期对博客的修改

自从开始写博客以来,对Wordpress的主题一直都比较感兴趣。为此还专门去W3C School把HTML,XHTML and CSS教程从头到尾看了一遍,PHP的语法也基本浏览了一遍。

本来也想按照自己的意愿制作主题,但工作实在太忙,制作主题也并非一蹴而就的事。 所以就一直对现在使用的默认主题做些边边角角的修改,暂时还是把重点放在博客内容上。

修改的主题内容:

  1. 对浏览器呈现的标题,现在主页是”Share Interesting To You | 星星博客”, 打开博文时标题为”博文标题 | 星星博客”
  2. 在每篇博文的标题下方加上发表时间及作者
  3. 打开单独的博文时,把原来后面的一大段英文改成博客名+静态连接地址. 本来想用中文标示”原创文章,转载请标明出处”, 但现在用的是英文版还不支持中文,再说现在的流量和博文质量估计也没到那程度,索性作罢.
  4. 在页面后面也增加了留言功能, 参考页面”About Me“.

安装的Wordpress插件:

  1. Google (XML) sitemap generator for Wordpress. 这个插件用来生成Google sitemap.xml文件,支持中文语言. 这样在Google网站管理员中心就能很方便的提交sitemap,以便Google抓取网站内容.现在Google,Yahoo已经收录了本博客,但Google还有一大半网页没有索引到数据库,也没别的好办法暂时只能等了.
  2. 留言订阅插件(subscribe to comments).这个插件可以让你的读者在留言之前通过选择一个选择框,然后得到以后留言的 e-mail 通知。大家也能看到在留言框之后有个”有新评论邮件通知我!”的复选框,不过我还没自己测试过它的功能.:-)

还想再改的:

  1. 页脚最好加上版权声明.
  2. 打开单篇博文时,也能显示侧边拦.
  3. 在主页显示最新的评论内容.
  4. 增加RSS订阅功能,这个现在还不是很清楚.
  5. 能够找到自己喜欢的Icon图片,加到地址栏的最前面.

当把剩下想修改的都实现了,我想基本就差不多了. 对主题的美化,由于我对美工不在行,估计也很难了.嗯,还不错,暂时就这样吧!

19 comments December 8th, 2008

WordPress主题

一看就知道现在用的是WordPress的默认主题,早早上线只希望能早点踏上新的启程。 功能,风格设计当然有很多需要改善, 但这何尝不是成长的过程。有变化才让人兴奋啊! 主题,插件一个都不能少。

其实也不想搞得太花哨,也不想花太多的精力,当你有一天能说”这个Blog还不错”的时候,我的目的也就得逞了。

那就先说说我暂时想要的主题吧。总的要求就是要简约,方便,够用就行。页面暂时有”Home”, “About”就够了,并且要在右上角,鼠标点起来方便。Sidebar包含Search, Archive, Category,Recent Comments, Meta在右边, 左边单独放链接,因为我怕以后会太多,哈哈!

还有就是Header背景图片和Logo的设计了,这个估计得花点时间。还没有太好的想法,图片处理我也不在行。

嗯,要不要自己动手做个主题呢?

2 comments November 14th, 2008

Newer Posts


订阅

存档

最新文章

最新留言

友情链接

分类

我的豆瓣