WordPress: FAQ Layout and Design:修订间差异

来自站长百科
跳转至: 导航、​ 搜索
(新页面: Back to FAQ __TOC__ == Layout and Styles == ===I am having trouble with my CSS so where can I find help?=== The following are articles that will help you troubleshoot ...)
 
无编辑摘要
第1行: 第1行:
[[Wordpress:FAQ|Back to FAQ]]
[[Wordpress:FAQ|Back to FAQ]]
[[Wordpress:FAQ|返回到常见问题解答]]
__TOC__
__TOC__


== Layout and Styles ==
== Layout and Styles ==
== 布局与设计 ==


===I am having trouble with my CSS so where can I find help?===
===I am having trouble with my CSS so where can I find help?===
===我有处理CSS的麻烦,我可以在哪儿得到帮助?===
The following are articles that will help you troubleshoot and solve many of your CSS problems:
The following are articles that will help you troubleshoot and solve many of your CSS problems:
以下的文章会帮助你充当故障检修员帮助你解决许多的CSS麻烦:


* [[Wordpress:Blog Design and Layout]]
* [[Wordpress:Blog Design and Layout]]
第13行: 第20行:
* [[Wordpress:CSS|WordPress CSS Information and Resources]]
* [[Wordpress:CSS|WordPress CSS Information and Resources]]


===How can I choose different styles or colours for my comments?===
 
* [[Wordpress:Blog Design and Layout|博客布局与设计]]
* [[Wordpress:Finding Your CSS Styles|找出你的CSS形式]]
* [[Wordpress:CSS Fixing Browser Bugs|CSS解决你的浏览器程序错误]]
* [[Wordpress:CSS Troubleshooting|CSS发现并修理故障]]
* [[Wordpress:CSS|WordPress CSS信息和资源]]
 
===How can I choose different styles or colours for my comments?===  
===我怎样为我的评论选择不同的形式和颜色?===
 
 
There are a variety of WordPress Plugins that change the look, layout, and colors of your comments and comment form. Look for various Comments Plugins in the [http://wordpress.org/extend/plugins/ Official WordPress Plugin Directory].
There are a variety of WordPress Plugins that change the look, layout, and colors of your comments and comment form. Look for various Comments Plugins in the [http://wordpress.org/extend/plugins/ Official WordPress Plugin Directory].
有许多的WordPress插件可以改变评论的外观,布局,颜色和形式。在[http://wordpress.org/extend/plugins/ 官方的WordPress 插件目录]上查找不同的评论插件。


===How do I change the size of the popup comments window?===
===How do I change the size of the popup comments window?===
===我怎样改变弹出来的评论框的尺寸大小?===
To change the look of the Popup Comments window in WordPress version 1.5, make changes to the <tt>comment-functions.php</tt> file where it shows the following line: <tt>function comments_popup_script($width=400, $height=400, $file='') {</tt>.
To change the look of the Popup Comments window in WordPress version 1.5, make changes to the <tt>comment-functions.php</tt> file where it shows the following line: <tt>function comments_popup_script($width=400, $height=400, $file='') {</tt>.
在WordPress1.5版本上改变弹出来的评论框的外观,对<tt>comment-functions.php</tt>文件做一些改变,在文件显示以下这一行的地方:<tt>function comments_popup_script($width=400, $height=400, $file='') {</tt>.


To change the look of the Popup Comments window in WordPress version 1.2.1 Mingus, make the following change to the <tt>template-functions-comment.php</tt> on line 50:
To change the look of the Popup Comments window in WordPress version 1.2.1 Mingus, make the following change to the <tt>template-functions-comment.php</tt> on line 50:
第23行: 第48行:
<pre><nowiki>function comments_popup_script($width=400, $height=400,  
<pre><nowiki>function comments_popup_script($width=400, $height=400,  
$file='wp-comments-popup.php')</nowiki></pre>
$file='wp-comments-popup.php')</nowiki></pre>
改变WordPress1.2.1 Mingus版本上弹出的评论窗口,在第五十行<tt>template-functions-comment.php</tt>上做出以下改变:
<pre><nowiki>function comments_popup_script($width=400, $height=400,
$file='wp-comments-popup.php')</nowiki></pre>


You can also change Line 81 of ''wp-comments-popup.php'' to alter the textarea size for people entering comments.
You can also change Line 81 of ''wp-comments-popup.php'' to alter the textarea size for people entering comments.
你也可以改变一下第八十一行的''wp-comments-popup.php''改变人们输入评论的文本区大小。


===Where can I find some other Themes and templates to use for styling my blog?===
===Where can I find some other Themes and templates to use for styling my blog?===
===我可以在哪儿找到一些其它的主题和模板来设计我的博客?===
* [http://themes.wordpress.net/theme-viewer.php WordPress Theme Viewer]
* [http://themes.wordpress.net/theme-viewer.php WordPress Theme Viewer]
* [http://www.bloggingpro.com/ Blogging Pro features a whole category of WordPress Themes]
* [http://www.bloggingpro.com/ Blogging Pro features a whole category of WordPress Themes]
* [http://codex.wordpress.org/Using_Themes/Theme_List The "official" WordPress Theme List]
* [http://codex.wordpress.org/Using_Themes/Theme_List The "official" WordPress Theme List]
* [http://www.alexking.org/blog/2005/02/27/wordpress-theme-competition/ Alex King's WordPress Theme Competition]
* [http://www.alexking.org/blog/2005/02/27/wordpress-theme-competition/ Alex King's WordPress Theme Competition]
* [http://themes.wordpress.net/theme-viewer.php WordPress主题阅读器]
* [http://www.bloggingpro.com/ 写博客 Pro 特色  WordPress 主题的一个完整目录]
* [http://codex.wordpress.org/Using_Themes/Theme_List The "官方的" WordPress 主题列表]
* [http://www.alexking.org/blog/2005/02/27/wordpress-theme-competition/ Alex King的 WordPress 主题竞争]


===Where can I find information about styling lists and nested lists?===
===Where can I find information about styling lists and nested lists?===
===我在哪儿可以找到设计的列表和嵌套的列表的信息?===
See [[Wordpress:Styling Lists with CSS]]
See [[Wordpress:Styling Lists with CSS]]
看看[[Wordpress:Styling Lists with CSS|CSS的设计列表]]


===How do I change the way menu links are listed?===
===How do I change the way menu links are listed?===
See [[Wordpress:Styling Lists with CSS]]
See [[Wordpress:Styling Lists with CSS]]
===我怎样改变菜单链接排列的方式?===
看看[[Wordpress:Styling Lists with CSS|CSS设计列表]]


===How do I get rid of the bullet points next to my links?===
===How do I get rid of the bullet points next to my links?===
See [[Wordpress:Styling Lists with CSS]]
See [[Wordpress:Styling Lists with CSS]]
===我怎样清除链接旁边的bullet符号?===
看看[[Wordpress:Styling Lists with CSS|CSS设计列表]]


===How can I create horizontal menus?===
===How can I create horizontal menus?===
See [[Wordpress:Creating Horizontal Menus]]
See [[Wordpress:Creating Horizontal Menus]]
===我怎样创建横向菜单?===
看看[[Wordpress:Creating Horizontal Menus|创建横向菜单]]


===How can I get my categories to display in the order I want?===
===How can I get my categories to display in the order I want?===
===我怎样使分类以我喜欢的方式出现?===
Two tags are involved in generating your category list.  For more information on setting the order and look of these see [[Wordpress:Template Tags/list cats|list_cats()]] and [[Wordpress:Template Tags/wp_list_cats|wp_list_cats()]].
Two tags are involved in generating your category list.  For more information on setting the order and look of these see [[Wordpress:Template Tags/list cats|list_cats()]] and [[Wordpress:Template Tags/wp_list_cats|wp_list_cats()]].
产生你的分类列表涉及到两个标签。关于设置这些的顺序和外观请看[[Wordpress:Template Tags/list cats|目录_cats()]] 和[[Wordpress:Template Tags/wp_list_cats|wp_list_cats()]].


===How can I get my links to open in a new window?===
===How can I get my links to open in a new window?===
===我怎样讲我的链接在一个新的窗口打开?===
Opening links in a new window is considered bad form in today's web as it has been abused. Yet, it still serves a purpose for demonstration sites that require more than one window open at a time.  This method will work for those links that you enter into the body of a post.
Opening links in a new window is considered bad form in today's web as it has been abused. Yet, it still serves a purpose for demonstration sites that require more than one window open at a time.  This method will work for those links that you enter into the body of a post.
在如今的网络中,在一个新的窗口打开链接,被认为是讨人嫌的行为,因为它被滥用了。但是这个可以用于,当一个站点打开时,不止需要一个窗口时的情况。这种方法可以适用于你将这些链接输进文章中时的情况。


After entering the link using the Quicktags button for "link", add <tt>target="_blank"</tt> to the individual*- link you want to have open in a new window when clicked. Consider adding text indicating that this link will open a new window, as required by web accessibility standards.
After entering the link using the Quicktags button for "link", add <tt>target="_blank"</tt> to the individual*- link you want to have open in a new window when clicked. Consider adding text indicating that this link will open a new window, as required by web accessibility standards.
在输入了链接以后,使用Quicktags按钮来"链接",将<tt>target="_blank"</tt>添加到个别的*-当点击时,你希望在一个新的窗口打开的链接。由万维网可接近性标准所要求的,考虑添加文章暗示这个链接将会在一个新的窗口中打开。


<pre>
<pre>
第57行: 第134行:
Page Title (Opens in new window)</a>
Page Title (Opens in new window)</a>
</pre>
</pre>
<pre>
<a href="<nowiki>http://example.com/page.php</nowiki>"
title="页面标题 – 在一个新的窗口中打开" target="_blank">
页面标题 (在一个新的窗口中打开)</a>
</pre>


===Is there a tool to encode ''HTML'' entities and tags so I can display code on my weblog?===
===Is there a tool to encode ''HTML'' entities and tags so I can display code on my weblog?===
===有没有一个工具可以给 ''HTML'' 实体和标签编码这样我就可以在我的博客中显示代码?===
The article [[Wordpress:Writing Code in Your Posts]] will help you write programming code and code examples in your posts. The [http://wordpress.org/resources/tools/encode.php Encode tool] will convert your [[Wordpress:Glossary#HTML|HTML]]/[[Wordpress:Glossary#XHTML|XHTML]] code into a form that can be displayed on your [[Wordpress:Glossary#Blog|blog]] without it being treated as [[Wordpress:Glossary#HTML|HTML]] by browsers.
The article [[Wordpress:Writing Code in Your Posts]] will help you write programming code and code examples in your posts. The [http://wordpress.org/resources/tools/encode.php Encode tool] will convert your [[Wordpress:Glossary#HTML|HTML]]/[[Wordpress:Glossary#XHTML|XHTML]] code into a form that can be displayed on your [[Wordpress:Glossary#Blog|blog]] without it being treated as [[Wordpress:Glossary#HTML|HTML]] by browsers.
文章[[Wordpress:Writing Code in Your Posts|在你的文章中写代码]]会帮助你在你的文章中写程序代码,和代码例子。[http://wordpress.org/resources/tools/encode.php 编码工具]会将你的[[Wordpress:Glossary#HTML|HTML]]/[[Wordpress:Glossary#XHTML|XHTML]]代码转变为一种形式,这种形式可以在你的[[Wordpress:Glossary#Blog|博客]]上显示,而不是被浏览器处理为[[Wordpress:Glossary#HTML|HTML]]。


There are also WordPress [[Wordpress:Plugins]] and other tools available to help integrate this proces into your site if you use it frequently to display code.
There are also WordPress [[Wordpress:Plugins]] and other tools available to help integrate this proces into your site if you use it frequently to display code.
如果你频繁地使用它来显示代码的话,也可以使用WordPress[[Wordpress:Plugins|插件]]和其它的工具将这个与你的站点一体化。


* [http://scott.yang.id.au/2004/05/syntax-hilight-enscript/ Scott Yang's Syntax Highlighting with Enscript in WordPress]
* [http://scott.yang.id.au/2004/05/syntax-hilight-enscript/ Scott Yang's Syntax Highlighting with Enscript in WordPress]
第67行: 第159行:


Also see: [[Wordpress:Fun Character Entities]]
Also see: [[Wordpress:Fun Character Entities]]
* [http://scott.yang.id.au/2004/05/syntax-hilight-enscript/针对WordPress编写的Scott Yang的语法]
* [http://redalt.com/downloads/ Owen Winkler的 Code Filter]
也看看: [[Wordpress:Fun Character Entities|有趣的字符体]]


===How do I do a ''dropcaps'' on the first letter of a post?===
===How do I do a ''dropcaps'' on the first letter of a post?===
===我怎样在文章的第一个字母上做''dropcaps''?===
''DropCaps'' is the name for the effect where the first letter of the first paragraph in an article drops below the line of text, and is displayed in a larger font-size than the other normal letters.
''DropCaps'' is the name for the effect where the first letter of the first paragraph in an article drops below the line of text, and is displayed in a larger font-size than the other normal letters.
在文章中第一段的第一个字母掉到了文本行的下面时,''DropCaps''就是给这个做样子的名称。通常字体必普通的字母大。
''DropCaps''
''DropCaps''


This can be done using BBCode quicktags. First, add this to your ''style sheet'':
This can be done using BBCode quicktags. First, add this to your ''style sheet'':
可以通过使用BBCode quicktags来完成这一点。首先在你的''样式表''上添加这个:
<pre>
<pre>
  #fp:first-letter {
  #fp:first-letter {
第80行: 第190行:
  }
  }
</pre>
</pre>
<pre>
#fp:first-letter {
font-size : 300%;
font-weight : bold;
float : left;
margin-right: 3px;
}
</pre>
then add following code to file ''/wp-includes/js/quicktags.js'' and put them among ''edButtons'':
then add following code to file ''/wp-includes/js/quicktags.js'' and put them among ''edButtons'':
然后将下面的代码添加到文件''/wp-includes/js/quicktags.js''上,并把它们放到''edButtons''中:
<pre>
<pre>
  edButtons[edButtons.length] =
  edButtons[edButtons.length] =
第90行: 第215行:
  );
  );
</pre>
</pre>
<pre>
edButtons[edButtons.length] =
new edButton('ed_capdrop'
,'CapDrop'
,'<p id="fp">'
,'</p>'
,'c'
);
</pre>


You will now see a CapDrop quicktag in your edit window.
You will now see a CapDrop quicktag in your edit window.
现在你可以在你的编辑框中看到一个CatDrop quicktag .


See also:
See also:
也看看:
* [http://wordpress.org/support/topic/9542 drop caps support question]
* [http://wordpress.org/support/topic/9542 drop caps support question]
* [http://wordpress.org/support/topic/9542 drop caps 支持问题]


===Where should I look for more information on CSS?===
===Where should I look for more information on CSS?===
===我在哪儿可以找到更多的关于CSS的信息?===
See [[Wordpress:CSS]]
See [[Wordpress:CSS]]
看看[[Wordpress:CSS|CSS]]


== Text and Content Display ==
== Text and Content Display ==
== 文章和内容显示 ==


===How do I show only the titles of articles on the weblog homepage?===
===How do I show only the titles of articles on the weblog homepage?===
===我怎样在博客主页上只显示文章标题?===
To show only the title of posts on the weblog homepage, in ''index.php'' replace
To show only the title of posts on the weblog homepage, in ''index.php'' replace
在博客主页上只显示文章的标题,在''index.php''中将:
  <?php the_content(); ?>
  <?php the_content(); ?>
<?php the_content(); ?>
With something like:
With something like:
替换为:
<?php
if (is_single()) {
the_content();
}
else {//no content, nothing.
}
?>
  <?php
  <?php
  if (is_single()) {
  if (is_single()) {
第114行: 第286行:


This will show the post content only on the individual posts page.
This will show the post content only on the individual posts page.
这样文章的内容只有在单独的文章网页上才会显示。
===How do I use the blogroll links rating feature to display the ratings?===
===我怎样使用blogroll 链接来给特色分等级以显示等级级别?===


===How do I use the blogroll links rating feature to display the ratings?===
In WordPress 1.5 and later, you have the option to rate the links in your Link Manager (Blogroll) and display the ratings for the world to see.
In WordPress 1.5 and later, you have the option to rate the links in your Link Manager (Blogroll) and display the ratings for the world to see.
在WordPress1.5及以后的版本,在你的链接管理器(Blogroll)中你能选择给链接鉴定等级,并且向世界显示等级级别。


To rate your links, edit the particular link (by using the "Links" editing interface, or "Blogroll" in later versions of WordPress -- rating is in the Advanced section), and rate the link from 0 - 10 using the dropdown menu.
To rate your links, edit the particular link (by using the "Links" editing interface, or "Blogroll" in later versions of WordPress -- rating is in the Advanced section), and rate the link from 0 - 10 using the dropdown menu.
给你的链接鉴定等级,(通过使用"链接"编辑界面,或者"Blogroll"在WordPress稍后的版本中—在高级部分的等级级别)编辑特殊的链接,使用下拉菜单将链接分为0-10的不同等级。


To get your link ratings to display, you may need to edit your Theme. See the documentation for the [[Wordpress:Template_Tags/wp_list_bookmarks|wp_list_bookmarks()]] or [[Wordpress:Template_Tags/get_links|get_links()]] Template Tags for more information.
To get your link ratings to display, you may need to edit your Theme. See the documentation for the [[Wordpress:Template_Tags/wp_list_bookmarks|wp_list_bookmarks()]] or [[Wordpress:Template_Tags/get_links|get_links()]] Template Tags for more information.
要显示你的链接级别,你可能需要编辑你的主题。看文件[[Wordpress:Template_Tags/wp_list_bookmarks|wp_列表_书签()]] 或者[[Wordpress:Template_Tags/get_links|得到_链接()]] 模板标签以得到更多的信息。


In WordPress 1.2, the procedure is slightly different. First, for each link category, you have to turn on the display of link ratings (Links -> Link Categories -> Show -> Rating).
In WordPress 1.2, the procedure is slightly different. First, for each link category, you have to turn on the display of link ratings (Links -> Link Categories -> Show -> Rating).
在WordPress1.2中,过程稍微有点不同。首先,对于每一个链接类别,你需要打开链接等级级别显示(链接 -> 链接种类 -> 显示-> 等级级别)。


Once that is done, you can display the ratings by changing the settings in the Options -> Link Manager screen:
Once that is done, you can display the ratings by changing the settings in the Options -> Link Manager screen:
你一旦完成了这一步,通过改变选项中的设置 -> 链接管理界面,你可以显示等级级别:
* a character (* by default)
* a character (* by default)
* 一个字符 (* 默认的)
* a number (the rating, 0-9)
* a number (the rating, 0-9)
* 一个数字 (等级级别, 0-9)
* images -- if you are using Images, you have the choice of using the same image displayed n times to show a rating of n, or using 10 different images, for one through 10.  
* images -- if you are using Images, you have the choice of using the same image displayed n times to show a rating of n, or using 10 different images, for one through 10.  
*图像—如果你正使用图像,你可以选择使用同一个图像显示n次来显示n的等级级别,或者对于从一到十显示十个不同的图像。


===How do I show an excerpt or teaser for an article on the weblog homepage?===
===How do I show an excerpt or teaser for an article on the weblog homepage?===
===我怎样在博客主页上显示文章摘录或者文章内容摘要?===
An ''excerpt'' should not be confused with the ''teaser'' which refers to the first few sentences or paragraphs of a [[Wordpress:Glossary#Post|post]].  When typing a long post you can insert the <nowiki><!--more--></nowiki> [[Wordpress:Write_Post_SubPanel#Quicktags|Quicktag]] after a few sentences to act as a cut-off point.  When the post is displayed on a category page, archive page, or home page, the '''teaser''' is displayed, followed by a hyperlink (such as '''Read the rest of this entry...''').  Your visitor can then click on that link to see the full version of your [[Wordpress:Glossary#Post|post]].   
An ''excerpt'' should not be confused with the ''teaser'' which refers to the first few sentences or paragraphs of a [[Wordpress:Glossary#Post|post]].  When typing a long post you can insert the <nowiki><!--more--></nowiki> [[Wordpress:Write_Post_SubPanel#Quicktags|Quicktag]] after a few sentences to act as a cut-off point.  When the post is displayed on a category page, archive page, or home page, the '''teaser''' is displayed, followed by a hyperlink (such as '''Read the rest of this entry...''').  Your visitor can then click on that link to see the full version of your [[Wordpress:Glossary#Post|post]].   
''摘录''不能与''文章内容摘要''相混淆,或者指的是[[Wordpress:Glossary#Post|文章]]的前几句话或者前几段。在写一篇很长的文章的时候,你可以在几句话后插入<nowiki><!--more--></nowiki> [[Wordpress:Write_Post_SubPanel#Quicktags|Quicktag]]作为分离点。当文章在一个类别页面,档案页面或者主页中显示时,'''文章内容摘要'''就显示了,后面跟着一个超链接(例如 '''读一下这个条目的剩余部分...''').


Note that some [[Wordpress:Using Themes|Themes]] do not support the '''more''' ability.  More information on how to present the '''more''' information can be found at [[Wordpress:Template Tags|Template Tag]] [[Wordpress:Template_Tags/the_content|the_content()]] and [[Wordpress:Customizing the Read More]].
Note that some [[Wordpress:Using Themes|Themes]] do not support the '''more''' ability.  More information on how to present the '''more''' information can be found at [[Wordpress:Template Tags|Template Tag]] [[Wordpress:Template_Tags/the_content|the_content()]] and [[Wordpress:Customizing the Read More]].
注意一些[[Wordpress:Using Themes|主题]]不支持'''更多的'''能力。可以在[[Wordpress:Template Tags|模板标签]] [[Wordpress:Template_Tags/the_content|内容()]] 和[[Wordpress:Customizing the Read More|定制阅读更多的]].上找到更多的怎样呈现'''更多的''' 信息的部分。


As stated before, recognize that use of the '''more''' feature should not be confused with the [[Wordpress:Glossary#Excerpt|Excerpt]] field in your [[Wordpress:Administration Panels|Administration]] > [[Wordpress:Administration_Panels#Write_-_Make_some_content|Write]] > [[Wordpress:Write_Post_SubPanel#Advanced_Post_Editing|Write Post Panel]].  The [[Wordpress:Template Tags|Template Tag]] [[Wordpress:Template Tags/the excerpt|the_excerpt()]] can be used to access the contents of this field (i.e. the excerpt you enter in your blog will not be used for anything unless you have <tt>the_excerpt</tt> in your theme, or you choose to include excerpts only in your RSS fields).
As stated before, recognize that use of the '''more''' feature should not be confused with the [[Wordpress:Glossary#Excerpt|Excerpt]] field in your [[Wordpress:Administration Panels|Administration]] > [[Wordpress:Administration_Panels#Write_-_Make_some_content|Write]] > [[Wordpress:Write_Post_SubPanel#Advanced_Post_Editing|Write Post Panel]].  The [[Wordpress:Template Tags|Template Tag]] [[Wordpress:Template Tags/the excerpt|the_excerpt()]] can be used to access the contents of this field (i.e. the excerpt you enter in your blog will not be used for anything unless you have <tt>the_excerpt</tt> in your theme, or you choose to include excerpts only in your RSS fields).


就像上面所陈述的,认可使用 '''更多的''' 特色不应该与你的 [[Wordpress:Administration Panels|管理]] > [[Wordpress:Administration_Panels#Write_-_Make_some_content|写]] > [[Wordpress:Write_Post_SubPanel#Advanced_Post_Editing|写文章面板]]中的 [[Wordpress:Glossary#Excerpt|摘录]]领域相混合。
===How do I customise the text shown in "(more.....)" on my weblog?===
===How do I customise the text shown in "(more.....)" on my weblog?===
===我怎样定制我的博客上的文章在"(更多的.....)"上的显示?===
See [[Wordpress:Customizing the Read More]]
See [[Wordpress:Customizing the Read More]]
看看[[Wordpress:Customizing the Read More|定制阅读更多的内容]]


==Images and Graphics==
==Images and Graphics==
==图像与图画==


===How to add a favicon to your site===
===How to add a favicon to your site===
===怎样为你的网站添加一个最喜爱的图标===
To add a favicon to your site in WordPress 2.0, place your '''favicon.ico''' file inside your theme folder (for example: ''wp-content/themes/default/'') then add this line to ''header.php'':
To add a favicon to your site in WordPress 2.0, place your '''favicon.ico''' file inside your theme folder (for example: ''wp-content/themes/default/'') then add this line to ''header.php'':
在WordPress2.0中为你的网站添加一个最喜爱的图标,在你的主题文件夹中(例如: ''wp-内容/主题/默认/'')放任你的'''favicon.ico''' 文件并将这一行添加到''header.php'':
<nowiki><link rel="shortcut icon" href="<?php bloginfo('template_directory'); ?>/favicon.ico" /></nowiki>


<nowiki><link rel="shortcut icon" href="<?php bloginfo('template_directory'); ?>/favicon.ico" /></nowiki>
<nowiki><link rel="shortcut icon" href="<?php bloginfo('template_directory'); ?>/favicon.ico" /></nowiki>


Be sure to add it somewhere within the <nowiki><head></head></nowiki> section.
Be sure to add it somewhere within the <nowiki><head></head></nowiki> section.
确保将它添加到<nowiki><head></head></nowiki> 里的某个位置上。


===Where can I get some buttons for my site?===
===Where can I get some buttons for my site?===
===我可以在哪儿为我的网站得到一些按钮?===


Buttons are like badges you display on your website to show your affection for something, or to display information regarding your cultural, social, political or technical leanings.   
Buttons are like badges you display on your website to show your affection for something, or to display information regarding your cultural, social, political or technical leanings.   
按钮就像你显示在你的网站上的证章,来显示你对某事的影响,或者显示关于你的文化,社会,政治或者技术方面倾向的信息。


To add a WordPress button to your site showing support for the WordPress Community:
To add a WordPress button to your site showing support for the WordPress Community:
在你的网站上添加一个WordPress按钮显示对WordPress团体的支持:


*[[Wordpress:Contributing_to_WordPress#Show_You_Care|Contributing to WordPress, Show you Care]]
*[[Wordpress:Contributing_to_WordPress#Show_You_Care|Contributing to WordPress, Show you Care]]
*[[Wordpress:Contributing_to_WordPress#Show_You_Care|对 WordPress做贡献, 显示你的关怀]]


For more buttons, see:
For more buttons, see:
更多的按钮,请看看:


* [http://www.gtmcknight.com/buttons/ GtmcKnight's Steal these Buttons]
* [http://www.gtmcknight.com/buttons/ GtmcKnight's Steal these Buttons]
* [http://www.gtmcknight.com/buttons/ GtmcKnight的 窃取这些按钮]
* [http://kalsey.com/tools/buttonmaker Adam Kalsey's Buttonmaker]
* [http://kalsey.com/tools/buttonmaker Adam Kalsey's Buttonmaker]
* [http://kalsey.com/tools/按钮制作器Adam Kalsey's 按钮制作器]


===How do I get WordPress to generate links to the thumbnail of an uploaded picture?===
===How do I get WordPress to generate links to the thumbnail of an uploaded picture?===
===我怎样使WordPress对于上传的图像上的一个极小的东西来产生链接?===
WordPress by default only produces very limited code after uploading a picture. If you want to get code for the thumbnail link, the thumbnail etc, autogenerated, the following resources will be useful, including a possible hack that may not work for WordPress v1.5 at [http://wordpress.org/support/topic/5325 Thumbnail HTML addition for upload.php].
WordPress by default only produces very limited code after uploading a picture. If you want to get code for the thumbnail link, the thumbnail etc, autogenerated, the following resources will be useful, including a possible hack that may not work for WordPress v1.5 at [http://wordpress.org/support/topic/5325 Thumbnail HTML addition for upload.php].
在默认情况下,WordPress在一个上传的图片上只产生一个非常有限的代码。如果你得到一个极短的链接,极小的等等,自动产生的,的代码,下面的资源会有用。包括在[http://wordpress.org/support/topic/5325 Thumbnail HTML addition for upload.php]上的一个在WordPress1.5上可能不能运行的插件。


See also:
See also:
第168行: 第416行:
*[[Wordpress:Plugins/Images|Image Plugins List]]
*[[Wordpress:Plugins/Images|Image Plugins List]]
*[[Wordpress:Photoblogs and Galleries]]
*[[Wordpress:Photoblogs and Galleries]]
See also:
也看看:
*[[Wordpress:Using Images|使用图像]]
*[[Wordpress:Plugins/Images|图像插件列表]]
*[[Wordpress:Photoblogs and Galleries|图片博客与图像集]]


===How can I use a custom image for my list bullets?===
===How can I use a custom image for my list bullets?===
===我怎样在我的目录bullet上使用一个定制的图像?===
See also:
See also:
*[[Wordpress:Styling Lists with CSS]]
*[[Wordpress:Styling Lists with CSS]]
*[[Wordpress:Customizing Your Sidebar]]
*[[Wordpress:Customizing Your Sidebar]]
看看:
*[[Wordpress:Styling Lists with CSS|CSS设计列表]]
*[[Wordpress:Customizing Your Sidebar|定制你的工具条]]


===How do I rotate/cycle/randomize the image in the header of the weblog?===
===How do I rotate/cycle/randomize the image in the header of the weblog?===
===我怎样在博客标题上使图像旋转/轮转/随机出现?===
See also:
See also:
*[[Wordpress:Designing_Headers#Rotating_Header_Images|Designing Headers, Rotating Header Images]]
*[[Wordpress:Designing_Headers#Rotating_Header_Images|Designing Headers, Rotating Header Images]]
也看看:
*[[Wordpress:Designing_Headers#Rotating_Header_Images|设计标题, 旋转标题图像]]


===How do I link to my own images?===
===How do I link to my own images?===
===我怎样链接到我自己的图像上?===
You can use absolute or relative [[Wordpress:Glossary#URI and URL|URI/URLs]] addresses.
You can use absolute or relative [[Wordpress:Glossary#URI and URL|URI/URLs]] addresses.
你可以使用绝对的或者相关的[[Wordpress:Glossary#URI and URL|URI/URLs| Wordpress:Glossary#URI和URL|URI/URLs]]地址。


To use a relative link, set the address from the '''root''' folder of your site by using a slash in front of the folder in the root directory.
To use a relative link, set the address from the '''root''' folder of your site by using a slash in front of the folder in the root directory.
使用一个相关的链接,通过在根目录的文件夹前面使用一个斜线来将地址从你的网站'''根'''文件夹上设置地址。


  <img src="<nowiki>/images/balloons/image.jpg</nowiki>" alt="balloons" />
  <img src="<nowiki>/images/balloons/image.jpg</nowiki>" alt="balloons" />
<img src="<nowiki>/images/balloons/image.jpg</nowiki>" alt="balloons" />


To use an absolute link:
To use an absolute link:
使用一个绝对链接:
  <img src="<nowiki>http://www.example.com/images/balloons/image.jpg</nowiki>" alt="balloons" />
  <img src="<nowiki>http://www.example.com/images/balloons/image.jpg</nowiki>" alt="balloons" />
<img src="<nowiki>http://www.example.com/images/balloons/image.jpg</nowiki>" alt="balloons" />


===How can I display images in my category and archive pages?===
===How can I display images in my category and archive pages?===
===我怎样在我的类别和归档页面上显示图像?===
When using the default [[Wordpress:Glossary#Theme|theme]], you'll notice images (and links) do not appear when visiting category and archive query pages. This has to do with how the default theme displays post content in those sections of your blog. To change this behavior,  edit the default theme's Archive Template (archive.php). You can do this online through the [[Wordpress:Administration_Panels#Theme_Editor|Theme Editor]], or offline by downloading and opening the default theme's archive.php in any text editor. Once in the Archive Template, look for this section:
When using the default [[Wordpress:Glossary#Theme|theme]], you'll notice images (and links) do not appear when visiting category and archive query pages. This has to do with how the default theme displays post content in those sections of your blog. To change this behavior,  edit the default theme's Archive Template (archive.php). You can do this online through the [[Wordpress:Administration_Panels#Theme_Editor|Theme Editor]], or offline by downloading and opening the default theme's archive.php in any text editor. Once in the Archive Template, look for this section:
当你使用默认的[[Wordpress:Glossary#Theme|主题]]时,你就会注意到当你访问类别和归档查询页面时,图像(和链接)没有出现。这与默认主题在你的博客的那些部分中怎样显示文章内容有关。改变这个行为,编辑默认主题的归档面板(archive.php)。你可以在线通过[[Wordpress:Administration_Panels#Theme_Editor|主题编辑器]]完成,或者离线时,通过在任何一个文字编辑器中下载并打开默认主题的archive.php来完成。一旦进入了归档面板,看一下这个部分:


  &lt;div class="entry"&gt;
  &lt;div class="entry"&gt;
    <?php the_excerpt() ?>
&lt;/div&gt;
&lt;div class="entry"&gt;
     <?php the_excerpt() ?>
     <?php the_excerpt() ?>
  &lt;/div&gt;
  &lt;/div&gt;
第200行: 第492行:
     <?php the_content(); ?>
     <?php the_content(); ?>
  &lt;/div&gt;
  &lt;/div&gt;
在这儿,更改一下[[Wordpress:Template_Tags/the_excerpt| _摘录()]]模板标签,模板标签在显示文章内容的摘要之后,过滤掉了所有的[[Wordpress:Glossary#HTML|HTML]]标签。显示每篇文章的所有内容(和 HTML标签),要使用[[Wordpress:Template_Tags/the_content| _内容()]]模板标签:
&lt;div class="entry"&gt;
    <?php the_content(); ?>
&lt;/div&gt;


===Where can I find more information on images, PhotoBlogs, and photo galleries?===
===Where can I find more information on images, PhotoBlogs, and photo galleries?===
===我在哪儿可以找到更多的关于图像,图像博客和图像集的信息?===
See also:
See also:
*[[Wordpress:Using Images]]
*[[Wordpress:Using Images]]
*[[Wordpress:Photoblogs and Galleries]]
*[[Wordpress:Photoblogs and Galleries]]
*[[Wordpress:Plugins/Images|Image Plugins]]
*[[Wordpress:Plugins/Images|Image Plugins]]
也看看:
*[[Wordpress:Using Images|使用图像]]
*[[Wordpress:Photoblogs and Galleries|照片博客和图像集]]
*[[Wordpress:Plugins/Images|图像插件]]


==Template Tags==
==Template Tags==
==模板标签==


===How do I change the time stamp for each post from an AM/PM mode to a 24 hour mode?===
===How do I change the time stamp for each post from an AM/PM mode to a 24 hour mode?===
===我怎样将每篇文章的时间标记从AM/PM形式改为一个24小时制的模式?===
You set the '''Default Time Format''' for your blog via the [[Wordpress:Administration Panels|Administration]] >  
You set the '''Default Time Format''' for your blog via the [[Wordpress:Administration Panels|Administration]] >  
[[Wordpress:Administration_Panels#Options_-_Configuration_Settings|Options]] > [[Wordpress:General_Options_SubPanel|General Panel]] under the
[[Wordpress:Administration_Panels#Options_-_Configuration_Settings|Options]] > [[Wordpress:General_Options_SubPanel|General Panel]] under the
[[Wordpress:General_Options_SubPanel#Date_and_Time|Date and Time section.]]
[[Wordpress:General_Options_SubPanel#Date_and_Time|Date and Time section.]]
通过[[Wordpress:General_Options_SubPanel#Date_and_Time|日期与时间部分。]]下的[[Wordpress:Administration Panels|管理]] >
[[Wordpress:Administration_Panels#Options_-_Configuration_Settings|选项]] > [[Wordpress:General_Options_SubPanel|总面板]],为你的博客设置'''默认时间格式'''


See also:
See also:
*[[Wordpress:Formatting Date and Time]]
*[[Wordpress:Formatting Date and Time]]
也看看:
*[[Wordpress:Formatting Date and Time|安排时间与日期格式]]


===How can I have the date/time displayed on every entry I make?===
===How can I have the date/time displayed on every entry I make?===
===我怎样使时间/日期显示在我制作的每一个条目上?===
To put the date and time on every post title on your site, you may have to change more than one [[Wordpress:Templates|template file]].  They may include <tt>index.php</tt>, <tt>single.php</tt>, <tt>category.php</tt>, and <tt>archives.php</tt>.  
To put the date and time on every post title on your site, you may have to change more than one [[Wordpress:Templates|template file]].  They may include <tt>index.php</tt>, <tt>single.php</tt>, <tt>category.php</tt>, and <tt>archives.php</tt>.  
将日期和时间放到你的网站上的每篇文章的标题上,你可能不止要改变一个[[Wordpress:Templates|模板文件]]。它们可能包括<tt>index.php</tt>, <tt>single.php</tt>, <tt>category.php</tt>, 和<tt>archives.php</tt>.。


From among the various template files, find all references to the title of your post like this (your Theme version may be slightly different):
From among the various template files, find all references to the title of your post like this (your Theme version may be slightly different):
在不同的模板文件中,找到所有像这个的你的文章标题的引用(你的主题版本可能稍微优点不同):
<pre><h2>
<a href="<?php the_permalink() ?>" rel="bookmark"
title="Permanent Link to <?php the_title(); ?>">
<?php the_title(); ?></a>
</h2>
<small>
<?php the_time('F jS, Y') ?> by <?php the_author() ?>
</small>
</pre>


<pre><h2>
<pre><h2>
第231行: 第565行:
</small>
</small>
</pre>
</pre>


Rearrange it so the time information goes in front (or in back) of your Post Title:
Rearrange it so the time information goes in front (or in back) of your Post Title:
将它重新排列这样时间信息就会出现在你的文章标题的前面(或者后面):
<pre><h2>
<a href="<?php the_permalink() ?>" rel="bookmark"
title="Permanent Link to <?php the_title(); ?>">
<?php the_time('F jS, Y') ?> - <?php the_title(); ?></a>
</h2>
<small>
by <?php the_author() ?>
</small>
</pre>


<pre><h2>
<pre><h2>
第246行: 第594行:
See also:
See also:
*[[Wordpress:Formatting Date and Time]]
*[[Wordpress:Formatting Date and Time]]
也看看:
*[[Wordpress:Formatting Date and Time|安排日期和时间格式]]


===How do I change the "Permanent Link to" in my Title link?===
===How do I change the "Permanent Link to" in my Title link?===
===我怎样在我的标题链接上更改"永久地链接到"?===
The <tt>title</tt> of your links includes text that explains what the link is to, in concordance with web accessibility standards.  By default, your title may look like this example, which uses the <tt>title</tt> attribute with the words "Permanent Link to" and the template tag that displays the title of the post.
The <tt>title</tt> of your links includes text that explains what the link is to, in concordance with web accessibility standards.  By default, your title may look like this example, which uses the <tt>title</tt> attribute with the words "Permanent Link to" and the template tag that displays the title of the post.
你的链接<tt>标题</tt>包含文章,文章解释了这个链接到哪儿,与网络可访问性标准相融合。在默认情况下,你的标题也许看起来像这个例子,使用了<tt>标题</tt>加上单词"永久的链接到"和显示文章标题的模板标签。


<pre><h2>
<pre><h2>
第256行: 第611行:
</h2>
</h2>
</pre>
</pre>
<pre><h2>
<a href="<?php the_permalink() ?>" rel="bookmark"
title="永久地链接到 <?php the_title(); ?>">
<?php the_title(); ?></a>
</h2>
</pre>


To change the "Permanent Link to" text, simply delete it and replace it with your own words:
To change the "Permanent Link to" text, simply delete it and replace it with your own words:
改变"永久地链接到"文章,只有删除它,并且将它替换为你自己的写的词就行了:
<pre><h2>
<a href="<?php the_permalink() ?>" rel="bookmark"
title="Post about <?php the_title(); ?>">
<?php the_title(); ?></a>
</h2>
</pre>


<pre><h2>
<pre><h2>
<a href="<?php the_permalink() ?>" rel="bookmark"  
<a href="<?php the_permalink() ?>" rel="bookmark"  
title="Post about <?php the_title(); ?>">
title="文章关于 <?php the_title(); ?>">
<?php the_title(); ?></a>
<?php the_title(); ?></a>
</h2>
</h2>
</pre>
</pre>


Or remove it completely, leaving only the title tag.
Or remove it completely, leaving only the title tag.
或者完全地把它删除,只留下标题标签。
<pre><h2>
<a href="<?php the_permalink() ?>" rel="bookmark"
title="<?php the_title(); ?>">
<?php the_title(); ?></a>
</h2>
</pre>


<pre><h2>
<pre><h2>
<a href="<?php the_permalink() ?>" rel="bookmark"  
<a href="<?php the_permalink() ?>" rel="bookmark"  
title="<?php the_title(); ?>">
标题="<?php the_title(); ?>">
<?php the_title(); ?></a>
<?php the_title(); ?></a>
</h2>
</h2>
</pre>
</pre>
   
   
===How do I make my Categories appear in alphabetical order?===
===How do I make my Categories appear in alphabetical order?===
===我怎样使我的类别依照字母表顺序出现?===
In some cases it may be necessary to change  ''index.php''.  
In some cases it may be necessary to change  ''index.php''.  
有些情况下,可能有必要改变''index.php''。


Find this line:
Find this line:
找到这一个行:
<pre><?php list_cats(0, 'All', 'name'); ?>
</pre>


<pre><?php list_cats(0, 'All', 'name'); ?>
<pre><?php list_cats(0, 'All', 'name'); ?>
</pre>
</pre>


and replace it with this line instead:
and replace it with this line instead:
将它改为这一行:


<pre><?php list_cats(0,'','name','','',true,0,1,1,1); ?></pre>
<pre><?php list_cats(0,'','name','','',true,0,1,1,1); ?></pre>
<pre><?php list_cats(0,'','name','','',true,0,1,1,1); ?></pre>


See also:
See also:
也看看:
*[[Wordpress:Template Tags/wp_list_cats]] and [[Wordpress:Template Tags/list_cats]]
*[[Wordpress:Template Tags/wp_list_cats]] and [[Wordpress:Template Tags/list_cats]]
*[[Wordpress:Template Tags/wp_list_cats|模板标签/wp¬_列表_cats]] 和[[Wordpress:Template Tags/list_cats|模板/列表_cats]]


===How do I make my categories appear in a drop down list ?===
===How do I make my categories appear in a drop down list ?===
===我怎样在下拉列表中显示类别?===


In some cases it may be necessary to change  ''index.php''.  
In some cases it may be necessary to change  ''index.php''.  
有些情况下,可能有必要更改  ''index.php''。
Find this line:
找一下这一行:


Find this line:
<pre><?php list_cats(0, 'All', 'name'); ?></pre>


<pre><?php list_cats(0, 'All', 'name'); ?></pre>
<pre><?php list_cats(0, 'All', 'name'); ?></pre>


and replace it with this line instead:
and replace it with this line instead:
将它替换为这一行:
<pre><form action="<?php echo $PHP_SELF ?>" method="get">
<pre><form action="<?php echo $PHP_SELF ?>" method="get">
<?php dropdown_cats(); ?>
<?php dropdown_cats(); ?>
<input type="submit" name="submit" value="view" />
<input type="submit" name="submit" value="view" />
</form></pre>
</form></pre>
<pre><form action="<?php echo $PHP_SELF ?>" method="get">
<?php dropdown_cats(); ?>
<input type="submit" name="submit" value="view" />
</form></pre>


See also:
See also:
也看看:
*[[Wordpress:Template_Tags/dropdown_cats]]  
*[[Wordpress:Template_Tags/dropdown_cats]]  
*[[Wordpress:Template_Tags/dropdown_cats|模板_标签/下拉列表_cats]]


===How do I exclude one or more categories from being listed in the list of categories?===
===How do I exclude one or more categories from being listed in the list of categories?===
===我怎样在种类目录中清除一个或者更多的种类?===
Use the following function to list your categories but exclude category 1:
Use the following function to list your categories but exclude category 1:
使用下面的功能来列出你的类别但是要清除类别1:


<pre><?php wp_list_cats('exclude=1'); ?></pre>
<pre><?php wp_list_cats('exclude=1'); ?></pre>
<pre><?php wp_list_cats('exclude=1'); ?></pre>


Of course, change the '''1''' to the ID of the category you want to exclude.
Of course, change the '''1''' to the ID of the category you want to exclude.
当然,将'''1'''改为你想要清除的种类的ID.
To exclude multiple categories, use this:
清除多个种类,请使用这个:


To exclude multiple categories, use this:
<pre><?php wp_list_cats('exclude=1, 2'); ?></pre>


<pre><?php wp_list_cats('exclude=1, 2'); ?></pre>
<pre><?php wp_list_cats('exclude=1, 2'); ?></pre>


Change 1 and 2 to the categories you want excluded. You can exclude more of them by adding their IDs separated by commas.
Change 1 and 2 to the categories you want excluded. You can exclude more of them by adding their IDs separated by commas.
将1和2改为你想要清除的种类。通过添加它们的ID,并且在ID中间加上逗号,你可以清除更多的。


See also:
See also:
也看看:
*[[Wordpress:Template Tags/wp_list_cats]] and [[Wordpress:Template Tags/list_cats]]
*[[Wordpress:Template Tags/wp_list_cats]] and [[Wordpress:Template Tags/list_cats]]
*[[Wordpress:Template Tags/wp_list_cats|模板标签/wp_列表_cats]] 和 [[Wordpress:Template Tags/list_cats|模板标签/list_cats]]


===How do I hide a category from the front page ''index.php''?===
===How do I hide a category from the front page ''index.php''?===
===我怎样在第一页 ''index.php''中隐藏种类?===
If you need to exclude a category from the front page, you can place code that does the exclusion inside [[Wordpress:The Loop]] of your theme's <tt>index.php</tt> file.
If you need to exclude a category from the front page, you can place code that does the exclusion inside [[Wordpress:The Loop]] of your theme's <tt>index.php</tt> file.
如果你想在首页中排除种类,你可以将用于清除的代码放到你的主题的<tt>index.php</tt> 文件中的[[Wordpress:The Loop|The Loop]]里面。


[[Wordpress:The Loop]] starts something like this:
[[Wordpress:The Loop]] starts something like this:
[[Wordpress:The Loop|The Loop]]以像这样的一些东西开始:


  <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
  <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>


To exclude category 4 from the front page, just inside [[Wordpress:The Loop]], add this condition :
To exclude category 4 from the front page, just inside [[Wordpress:The Loop]], add this condition :
在首页中清除类别4,只要在[[Wordpress:The Loop|The Loop]]里添加这个条件:


  <?php if ( !(in_category('4')) || !is_home() ) { ?>
  <?php if ( !(in_category('4')) || !is_home() ) { ?>
<nowiki><!-- Output the post here --></nowiki>
<?php if ( !(in_category('4')) || !is_home() ) { ?>
  <nowiki><!-- Output the post here --></nowiki>
  <nowiki><!-- Output the post here --></nowiki>


[[Wordpress:The Loop]] ends something like this:
[[Wordpress:The Loop]] ends something like this:
[[Wordpress:The Loop|The Loop]]终止一些像这样的东西:
<?php endwhile; ?>
<?php endwhile; ?>


<?php endwhile; ?>


Just before that line, add this:
Just before that line, add this:
在这一行的前面,添加:
  <?php } ?>
  <?php } ?>
<?php } ?>


In the end, it will look like:
In the end, it will look like:
最后,它可能看起来像:


  <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
  <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
第351行: 第807行:
  <?php } ?>
  <?php } ?>
  <?php endwhile; ?>
  <?php endwhile; ?>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<?php if ( !(in_category('4')) || !is_home() ) { ?>
<nowiki><!-- Output the post here --></nowiki>
<?php } ?>
<?php endwhile; ?>


This means that if on the front page, the post will be presented if it's not in category 4. On pages other than the front ( home ) page, all posts are presented.  
This means that if on the front page, the post will be presented if it's not in category 4. On pages other than the front ( home ) page, all posts are presented.  
这意味着,如果文章不是在类别4里面,文章会在首页显现。除了首页(主页)以外的其它页面上,所有的文章都能显现。


See also:
See also:
*[[Wordpress:The_Loop#Exclude_Posts_From_Some_Category|Exclude Posts From Some Category]]
*[[Wordpress:The_Loop#Exclude_Posts_From_Some_Category|Exclude Posts From Some Category]]
也看看:
*[[Wordpress:The_Loop#Exclude_Posts_From_Some_Category|从一些种类中清除文章]]


===How do I make my Archives appear in a drop-down list?===
===How do I make my Archives appear in a drop-down list?===
===我怎样使我的归档出现在一个下拉列表里面?===
Put this code into your ''index.php'' where you wish the item to appear:
Put this code into your ''index.php'' where you wish the item to appear:
将这个代码放到你的''index.php''里,你希望你的条目出现的地方。
<pre>
<li id="archives">Archives:
<ul>
<li><form name="archiveform" action="">
<select name="archive_chrono" onchange="window.location =
  (document.forms.archiveform.archive_chrono[document.forms.archiveform.archive_chrono.selectedIndex].value);">
<option value=''>By Month</option>
< ?php get_archives('','','option', 1); ?>
</></select>
</form>
</li>
</ul></li>
</pre>


<pre>
<pre>
第373行: 第868行:
</ul></li>  
</ul></li>  
</pre>
</pre>


===How can I customize the ''more'' tag?===
===How can I customize the ''more'' tag?===
===我怎样定制''更多的'' 标签?===
See also:
See also:
也看看:
*[[Wordpress:Customizing the Read More]]
*[[Wordpress:Customizing the Read More]]
*[[Wordpress:Customizing the Read More|定制阅读更多的]]


==Templates==
==Templates==
==模板==
===Why can I see only n posts on the blog, where are the other entries?===
===Why can I see only n posts on the blog, where are the other entries?===
===为什么在博客上我只能看见n文章,其它的条目在哪儿?===
Make sure that you have the correct settings in the '''Show at most''' posts or days fields in the [[Wordpress:Administration Panels|Administration]] >  
Make sure that you have the correct settings in the '''Show at most''' posts or days fields in the [[Wordpress:Administration Panels|Administration]] >  
[[Wordpress:Administration_Panels#Options_-_Configuration_Settings|Options]] > [[Wordpress:Reading_Options_SubPanel#Reading Options|Reading Panel]].
[[Wordpress:Administration_Panels#Options_-_Configuration_Settings|Options]] > [[Wordpress:Reading_Options_SubPanel#Reading Options|Reading Panel]].
要确保你在[[Wordpress:Administration Panels|管理]] >
[[Wordpress:Administration_Panels#Options_-_Configuration_Settings|选项]] > [[Wordpress:Reading_Options_SubPanel#Reading Options|阅读面板]]中的''最多的显示'''文章或者 时期领域中的设置是正确的。


If you are not seeing all your entries and you modified the default [[Wordpress:WordPress Files|index.php]], make sure you have an equal number of opening and closing tags, and that they are in the right places.
If you are not seeing all your entries and you modified the default [[Wordpress:WordPress Files|index.php]], make sure you have an equal number of opening and closing tags, and that they are in the right places.
如果你没有看见你所有的条目,而且你更改了默认的[[Wordpress:WordPress Files|index.php]],确保你有同等数目的开与关的标签,而且它们所在位置是正确的。


===How do I create an archives page, with all the entries sortable by different methods?===
===How do I create an archives page, with all the entries sortable by different methods?===
===我怎样创建一个归档的页面,上面所有的条目通过不同的方法都可以归类?===
See also:
See also:
也看看:
*[[Wordpress:Creating an Archive Index]]
*[[Wordpress:Creating an Archive Index]]
*[[Wordpress:Plugins]]
*[[Wordpress:Plugins]]
*[http://www.davidsaccess.com/?p=124 Another Nicer Archives Version]
*[http://www.davidsaccess.com/?p=124 Another Nicer Archives Version]
*[http://www.sporadicnonsense.com/2005/04/28/clean-archives-plug-in/ Sporadic Nonsense's Clean Archives Plugin]
*[http://www.sporadicnonsense.com/2005/04/28/clean-archives-plug-in/ Sporadic Nonsense's Clean Archives Plugin]
*[[Wordpress:Creating an Archive Index|创建一个归档索引]]
*[[Wordpress:Plugins|插件]]
*[http://www.davidsaccess.com/?p=124 另一个更好的归档版本]
*[http://www.sporadicnonsense.com/2005/04/28/clean-archives-plug-in/ Sporadic Nonsense的 Clean 归档插件]


===What do the _() and _e() functions in WordPress do?===
===What do the _() and _e() functions in WordPress do?===
=== WordPress中的 _()和 _e() 功能的用处是什么?===
In the simplest of terms, they "print" what you tell them to do. They are abbreviations for the PHP term "echo" which displays text. In WordPress, they are used to identify strings in the php files marked for translation to other languages, and localization using two "tags" which are actually functions. They are:
In the simplest of terms, they "print" what you tell them to do. They are abbreviations for the PHP term "echo" which displays text. In WordPress, they are used to identify strings in the php files marked for translation to other languages, and localization using two "tags" which are actually functions. They are:
* __()  
* __()  
*  _e()
*  _e()
在最简单的术语中,它们"打印"你叫它们做的事。他们是PHP术语的缩写,"重复"文章中显示的内容。在WordPress中,它们被用来识别php文件中的命令行,php文件标志翻译到其它语言和使用两个"标签"定位,它们事实上是功能。它们是:
* __()
*  _e()


These accept a string as an argument. For example:
These accept a string as an argument. For example:
这些接受一个字符串作为一个论据。例如:


  __("Translate Me")
  __("Translate Me")
  _e("Translate Me")
  _e("Translate Me")
__("Translate Me")
_e("Translate Me")


The only functional difference between the two methods is that _e() echoes the string and () simply returns the string. () is used when you want to supply a string to a function. _e() is used when you want to output the string as part of your XHTML.
The only functional difference between the two methods is that _e() echoes the string and () simply returns the string. () is used when you want to supply a string to a function. _e() is used when you want to output the string as part of your XHTML.
两种方法的唯一的功能上的区别是_e()重复了字符串而()只是返回了字符串。当你想要为一个功能提供一个字符串时,你使用()。当你想要拿出字符串作为你的XHTML的一部分时,你使用_e()。


We have a tool which goes through all of the php files, extracting strings that are marked by '''__()''' and '''_e()'''.  
We have a tool which goes through all of the php files, extracting strings that are marked by '''__()''' and '''_e()'''.  
我们有一个能够检查所有的php文件的工具,提取出所有的以'''__()''' 和 '''_e()'''为标记的字符串。


See also:
See also:
也看看:
*[[Wordpress:Conditional Tags]]
*[[Wordpress:Conditional Tags]]
*[[Wordpress:Conditional Tags|引起条件反应的标签]]


==Themes==
==Themes==
==主题==
===How do I use a Theme style from Alex King’s site?===
===How do I use a Theme style from Alex King’s site?===
===我怎样从Alex King的网站上使用一个主题形式?===
See also:  
See also:  
也看看:
*[[Wordpress:Using Themes]]
*[[Wordpress:Using Themes]]
*[[Wordpress:Using Themes/Theme List]]
*[[Wordpress:Using Themes/Theme List]]
* [http://www.alexking.org/blog/2005/02/27/wordpress-theme-competition/ Alex Kings Theme Competition]
* [http://www.alexking.org/blog/2005/02/27/wordpress-theme-competition/ Alex Kings Theme Competition]
*[[Wordpress:Using Themes|使用主题]]
*[[Wordpress:Using Themes/Theme List|主题列表]]
* [http://www.alexking.org/blog/2005/02/27/wordpress-theme-competition/ Alex Kings 主题竞争]


===Which files do I modify when I start to design my site?===
===Which files do I modify when I start to design my site?===
===当我开始设计我的站点的时候,我需要改变哪个文件?===
See also:
See also:
也看看:
*[[Wordpress:Working_with_WordPress#Site_Development|Working with WordPress, Site Development]]
*[[Wordpress:Working_with_WordPress#Site_Development|Working with WordPress, Site Development]]
*[[Wordpress:Working_with_WordPress#Site_Development|与WordPress共事,站点发展]]


===How do you create a screenshot.png for your Theme?===
===How do you create a screenshot.png for your Theme?===
===你怎样为你的主题创建一个screenshot.png?===
See also:
See also:
也看看:
*[http://www.tanster.com/?p=162 Tanster's Quick and dirty way to create screenshot.png]
*[http://www.tanster.com/?p=162 Tanster's Quick and dirty way to create screenshot.png]


[[Wordpress:FAQ|Back to FAQ]]
[[Wordpress:FAQ|Back to FAQ]]
*[http://www.tanster.com/?p=162 Tanster's Quick and dirty way to create screenshot.png]
[[Wordpress:FAQ|返回到常见问题解答]]

2008年3月31日 (一) 14:20的版本

Back to FAQ 返回到常见问题解答

Layout and Styles

布局与设计

I am having trouble with my CSS so where can I find help?

我有处理CSS的麻烦,我可以在哪儿得到帮助?

The following are articles that will help you troubleshoot and solve many of your CSS problems: 以下的文章会帮助你充当故障检修员帮助你解决许多的CSS麻烦:


How can I choose different styles or colours for my comments?

我怎样为我的评论选择不同的形式和颜色?

There are a variety of WordPress Plugins that change the look, layout, and colors of your comments and comment form. Look for various Comments Plugins in the Official WordPress Plugin Directory.

有许多的WordPress插件可以改变评论的外观,布局,颜色和形式。在官方的WordPress 插件目录上查找不同的评论插件。


How do I change the size of the popup comments window?

我怎样改变弹出来的评论框的尺寸大小?

To change the look of the Popup Comments window in WordPress version 1.5, make changes to the comment-functions.php file where it shows the following line: function comments_popup_script($width=400, $height=400, $file=) {.

在WordPress1.5版本上改变弹出来的评论框的外观,对comment-functions.php文件做一些改变,在文件显示以下这一行的地方:function comments_popup_script($width=400, $height=400, $file=) {.


To change the look of the Popup Comments window in WordPress version 1.2.1 Mingus, make the following change to the template-functions-comment.php on line 50:

function comments_popup_script($width=400, $height=400, 
$file='wp-comments-popup.php')


改变WordPress1.2.1 Mingus版本上弹出的评论窗口,在第五十行template-functions-comment.php上做出以下改变:

function comments_popup_script($width=400, $height=400, 
$file='wp-comments-popup.php')


You can also change Line 81 of wp-comments-popup.php to alter the textarea size for people entering comments.

你也可以改变一下第八十一行的wp-comments-popup.php改变人们输入评论的文本区大小。

Where can I find some other Themes and templates to use for styling my blog?

我可以在哪儿找到一些其它的主题和模板来设计我的博客?




Where can I find information about styling lists and nested lists?

===我在哪儿可以找到设计的列表和嵌套的列表的信息?===


See Wordpress:Styling Lists with CSS

看看CSS的设计列表

How do I change the way menu links are listed?

See Wordpress:Styling Lists with CSS

我怎样改变菜单链接排列的方式?

看看CSS设计列表


How do I get rid of the bullet points next to my links?

See Wordpress:Styling Lists with CSS

我怎样清除链接旁边的bullet符号?

看看CSS设计列表


How can I create horizontal menus?

See Wordpress:Creating Horizontal Menus

我怎样创建横向菜单?

看看创建横向菜单


How can I get my categories to display in the order I want?

我怎样使分类以我喜欢的方式出现?

Two tags are involved in generating your category list. For more information on setting the order and look of these see list_cats() and wp_list_cats().

产生你的分类列表涉及到两个标签。关于设置这些的顺序和外观请看目录_cats()wp_list_cats().


How can I get my links to open in a new window?

我怎样讲我的链接在一个新的窗口打开?

Opening links in a new window is considered bad form in today's web as it has been abused. Yet, it still serves a purpose for demonstration sites that require more than one window open at a time. This method will work for those links that you enter into the body of a post.

在如今的网络中,在一个新的窗口打开链接,被认为是讨人嫌的行为,因为它被滥用了。但是这个可以用于,当一个站点打开时,不止需要一个窗口时的情况。这种方法可以适用于你将这些链接输进文章中时的情况。

After entering the link using the Quicktags button for "link", add target="_blank" to the individual*- link you want to have open in a new window when clicked. Consider adding text indicating that this link will open a new window, as required by web accessibility standards.

在输入了链接以后,使用Quicktags按钮来"链接",将target="_blank"添加到个别的*-当点击时,你希望在一个新的窗口打开的链接。由万维网可接近性标准所要求的,考虑添加文章暗示这个链接将会在一个新的窗口中打开。

<a href="http://example.com/page.php" 
title="Page Title - opens in new window" target="_blank">
Page Title (Opens in new window)</a>
<a href="http://example.com/page.php" 
title="页面标题 – 在一个新的窗口中打开" target="_blank">
页面标题 (在一个新的窗口中打开)</a>


Is there a tool to encode HTML entities and tags so I can display code on my weblog?

有没有一个工具可以给 HTML 实体和标签编码这样我就可以在我的博客中显示代码?

The article Wordpress:Writing Code in Your Posts will help you write programming code and code examples in your posts. The Encode tool will convert your HTML/XHTML code into a form that can be displayed on your blog without it being treated as HTML by browsers.

文章在你的文章中写代码会帮助你在你的文章中写程序代码,和代码例子。编码工具会将你的HTML/XHTML代码转变为一种形式,这种形式可以在你的博客上显示,而不是被浏览器处理为HTML


There are also WordPress Wordpress:Plugins and other tools available to help integrate this proces into your site if you use it frequently to display code.

如果你频繁地使用它来显示代码的话,也可以使用WordPress插件和其它的工具将这个与你的站点一体化。

Also see: Wordpress:Fun Character Entities


也看看: 有趣的字符体


How do I do a dropcaps on the first letter of a post?

我怎样在文章的第一个字母上做dropcaps?

DropCaps is the name for the effect where the first letter of the first paragraph in an article drops below the line of text, and is displayed in a larger font-size than the other normal letters.

在文章中第一段的第一个字母掉到了文本行的下面时,DropCaps就是给这个做样子的名称。通常字体必普通的字母大。

DropCaps DropCaps


This can be done using BBCode quicktags. First, add this to your style sheet: 可以通过使用BBCode quicktags来完成这一点。首先在你的样式表上添加这个:

 #fp:first-letter {
 font-size : 300%;
 font-weight : bold;
 float : left;
 margin-right: 3px;
 }


 #fp:first-letter {
 font-size : 300%;
 font-weight : bold;
 float : left;
 margin-right: 3px;
 }

then add following code to file /wp-includes/js/quicktags.js and put them among edButtons:

然后将下面的代码添加到文件/wp-includes/js/quicktags.js上,并把它们放到edButtons中:

 edButtons[edButtons.length] =
 new edButton('ed_capdrop'
 ,'CapDrop'
 ,'<p id="fp">'
 ,'</p>'
 ,'c'
 );



 edButtons[edButtons.length] =
 new edButton('ed_capdrop'
 ,'CapDrop'
 ,'<p id="fp">'
 ,'</p>'
 ,'c'
 );


You will now see a CapDrop quicktag in your edit window. 现在你可以在你的编辑框中看到一个CatDrop quicktag .

See also: 也看看:


Where should I look for more information on CSS?

我在哪儿可以找到更多的关于CSS的信息?

See Wordpress:CSS 看看CSS


Text and Content Display

文章和内容显示

How do I show only the titles of articles on the weblog homepage?

我怎样在博客主页上只显示文章标题?

To show only the title of posts on the weblog homepage, in index.php replace 在博客主页上只显示文章的标题,在index.php中将:

<?php the_content(); ?>

<?php the_content(); ?>


With something like: 替换为:

<?php
if (is_single()) {
the_content();
}
else {//no content, nothing.
}
?>



<?php
if (is_single()) {
the_content();
}
else {//no content, nothing.
}
?>

This will show the post content only on the individual posts page. 这样文章的内容只有在单独的文章网页上才会显示。

How do I use the blogroll links rating feature to display the ratings?

我怎样使用blogroll 链接来给特色分等级以显示等级级别?

In WordPress 1.5 and later, you have the option to rate the links in your Link Manager (Blogroll) and display the ratings for the world to see.

在WordPress1.5及以后的版本,在你的链接管理器(Blogroll)中你能选择给链接鉴定等级,并且向世界显示等级级别。

To rate your links, edit the particular link (by using the "Links" editing interface, or "Blogroll" in later versions of WordPress -- rating is in the Advanced section), and rate the link from 0 - 10 using the dropdown menu.

给你的链接鉴定等级,(通过使用"链接"编辑界面,或者"Blogroll"在WordPress稍后的版本中—在高级部分的等级级别)编辑特殊的链接,使用下拉菜单将链接分为0-10的不同等级。

To get your link ratings to display, you may need to edit your Theme. See the documentation for the wp_list_bookmarks() or get_links() Template Tags for more information.

要显示你的链接级别,你可能需要编辑你的主题。看文件wp_列表_书签() 或者得到_链接() 模板标签以得到更多的信息。


In WordPress 1.2, the procedure is slightly different. First, for each link category, you have to turn on the display of link ratings (Links -> Link Categories -> Show -> Rating).

在WordPress1.2中,过程稍微有点不同。首先,对于每一个链接类别,你需要打开链接等级级别显示(链接 -> 链接种类 -> 显示-> 等级级别)。


Once that is done, you can display the ratings by changing the settings in the Options -> Link Manager screen:

你一旦完成了这一步,通过改变选项中的设置 -> 链接管理界面,你可以显示等级级别:

  • a character (* by default)
  • 一个字符 (* 默认的)
  • a number (the rating, 0-9)
  • 一个数字 (等级级别, 0-9)
  • images -- if you are using Images, you have the choice of using the same image displayed n times to show a rating of n, or using 10 different images, for one through 10.
  • 图像—如果你正使用图像,你可以选择使用同一个图像显示n次来显示n的等级级别,或者对于从一到十显示十个不同的图像。


How do I show an excerpt or teaser for an article on the weblog homepage?

我怎样在博客主页上显示文章摘录或者文章内容摘要?

An excerpt should not be confused with the teaser which refers to the first few sentences or paragraphs of a post. When typing a long post you can insert the <!--more--> Quicktag after a few sentences to act as a cut-off point. When the post is displayed on a category page, archive page, or home page, the teaser is displayed, followed by a hyperlink (such as Read the rest of this entry...). Your visitor can then click on that link to see the full version of your post.

摘录不能与文章内容摘要相混淆,或者指的是文章的前几句话或者前几段。在写一篇很长的文章的时候,你可以在几句话后插入<!--more--> Quicktag作为分离点。当文章在一个类别页面,档案页面或者主页中显示时,文章内容摘要就显示了,后面跟着一个超链接(例如 读一下这个条目的剩余部分...).


Note that some Themes do not support the more ability. More information on how to present the more information can be found at Template Tag the_content() and Wordpress:Customizing the Read More.

注意一些主题不支持更多的能力。可以在模板标签 内容()定制阅读更多的.上找到更多的怎样呈现更多的 信息的部分。


As stated before, recognize that use of the more feature should not be confused with the Excerpt field in your Administration > Write > Write Post Panel. The Template Tag the_excerpt() can be used to access the contents of this field (i.e. the excerpt you enter in your blog will not be used for anything unless you have the_excerpt in your theme, or you choose to include excerpts only in your RSS fields).


就像上面所陈述的,认可使用 更多的 特色不应该与你的 管理 > > 写文章面板中的 摘录领域相混合。

How do I customise the text shown in "(more.....)" on my weblog?

我怎样定制我的博客上的文章在"(更多的.....)"上的显示?

See Wordpress:Customizing the Read More 看看定制阅读更多的内容


Images and Graphics

图像与图画

How to add a favicon to your site

怎样为你的网站添加一个最喜爱的图标

To add a favicon to your site in WordPress 2.0, place your favicon.ico file inside your theme folder (for example: wp-content/themes/default/) then add this line to header.php:

在WordPress2.0中为你的网站添加一个最喜爱的图标,在你的主题文件夹中(例如: wp-内容/主题/默认/)放任你的favicon.ico 文件并将这一行添加到header.php:


<link rel="shortcut icon" href="<?php bloginfo('template_directory'); ?>/favicon.ico" />

<link rel="shortcut icon" href="<?php bloginfo('template_directory'); ?>/favicon.ico" />


Be sure to add it somewhere within the <head></head> section.

确保将它添加到<head></head> 里的某个位置上。


Where can I get some buttons for my site?

我可以在哪儿为我的网站得到一些按钮?

Buttons are like badges you display on your website to show your affection for something, or to display information regarding your cultural, social, political or technical leanings.

按钮就像你显示在你的网站上的证章,来显示你对某事的影响,或者显示关于你的文化,社会,政治或者技术方面倾向的信息。


To add a WordPress button to your site showing support for the WordPress Community: 在你的网站上添加一个WordPress按钮显示对WordPress团体的支持:


For more buttons, see:

更多的按钮,请看看:



How do I get WordPress to generate links to the thumbnail of an uploaded picture?

我怎样使WordPress对于上传的图像上的一个极小的东西来产生链接?

WordPress by default only produces very limited code after uploading a picture. If you want to get code for the thumbnail link, the thumbnail etc, autogenerated, the following resources will be useful, including a possible hack that may not work for WordPress v1.5 at Thumbnail HTML addition for upload.php.

在默认情况下,WordPress在一个上传的图片上只产生一个非常有限的代码。如果你得到一个极短的链接,极小的等等,自动产生的,的代码,下面的资源会有用。包括在Thumbnail HTML addition for upload.php上的一个在WordPress1.5上可能不能运行的插件。


See also:

See also: 也看看:


How can I use a custom image for my list bullets?

我怎样在我的目录bullet上使用一个定制的图像?

See also:


看看:

How do I rotate/cycle/randomize the image in the header of the weblog?

我怎样在博客标题上使图像旋转/轮转/随机出现?

See also:

也看看:


How do I link to my own images?

我怎样链接到我自己的图像上?

You can use absolute or relative URI/URLs addresses.

你可以使用绝对的或者相关的URI/URLs| Wordpress:Glossary#URI和URL|URI/URLs地址。

To use a relative link, set the address from the root folder of your site by using a slash in front of the folder in the root directory.

使用一个相关的链接,通过在根目录的文件夹前面使用一个斜线来将地址从你的网站文件夹上设置地址。

<img src="/images/balloons/image.jpg" alt="balloons" />

<img src="/images/balloons/image.jpg" alt="balloons" />


To use an absolute link: 使用一个绝对链接:

<img src="http://www.example.com/images/balloons/image.jpg" alt="balloons" />

<img src="http://www.example.com/images/balloons/image.jpg" alt="balloons" />


How can I display images in my category and archive pages?

我怎样在我的类别和归档页面上显示图像?

When using the default theme, you'll notice images (and links) do not appear when visiting category and archive query pages. This has to do with how the default theme displays post content in those sections of your blog. To change this behavior, edit the default theme's Archive Template (archive.php). You can do this online through the Theme Editor, or offline by downloading and opening the default theme's archive.php in any text editor. Once in the Archive Template, look for this section:

当你使用默认的主题时,你就会注意到当你访问类别和归档查询页面时,图像(和链接)没有出现。这与默认主题在你的博客的那些部分中怎样显示文章内容有关。改变这个行为,编辑默认主题的归档面板(archive.php)。你可以在线通过主题编辑器完成,或者离线时,通过在任何一个文字编辑器中下载并打开默认主题的archive.php来完成。一旦进入了归档面板,看一下这个部分:

<div class="entry">
    <?php the_excerpt() ?>
</div>


<div class="entry">

    <?php the_excerpt() ?>
</div>

Here, change the_excerpt() template tag, which displays a summary of a post's content while filtering out all HTML tags. To display each post's whole content (and HTML tags), use the_content() template tag:

<div class="entry">
   <?php the_content(); ?>
</div>

在这儿,更改一下 _摘录()模板标签,模板标签在显示文章内容的摘要之后,过滤掉了所有的HTML标签。显示每篇文章的所有内容(和 HTML标签),要使用 _内容()模板标签:

<div class="entry">

   <?php the_content(); ?>
</div>


Where can I find more information on images, PhotoBlogs, and photo galleries?

我在哪儿可以找到更多的关于图像,图像博客和图像集的信息?

See also:

也看看:

Template Tags

模板标签

How do I change the time stamp for each post from an AM/PM mode to a 24 hour mode?

我怎样将每篇文章的时间标记从AM/PM形式改为一个24小时制的模式?

You set the Default Time Format for your blog via the Administration > Options > General Panel under the Date and Time section.

通过日期与时间部分。下的管理 > 选项 > 总面板,为你的博客设置默认时间格式


See also:

也看看:


How can I have the date/time displayed on every entry I make?

我怎样使时间/日期显示在我制作的每一个条目上?

To put the date and time on every post title on your site, you may have to change more than one template file. They may include index.php, single.php, category.php, and archives.php.

将日期和时间放到你的网站上的每篇文章的标题上,你可能不止要改变一个模板文件。它们可能包括index.php, single.php, category.php, 和archives.php.。


From among the various template files, find all references to the title of your post like this (your Theme version may be slightly different): 在不同的模板文件中,找到所有像这个的你的文章标题的引用(你的主题版本可能稍微优点不同):

<h2>
<a href="<?php the_permalink() ?>" rel="bookmark" 
title="Permanent Link to <?php the_title(); ?>">
<?php the_title(); ?></a>
</h2>
<small>
<?php the_time('F jS, Y') ?> by <?php the_author() ?>
</small>


<h2>
<a href="<?php the_permalink() ?>" rel="bookmark" 
title="Permanent Link to <?php the_title(); ?>">
<?php the_title(); ?></a>
</h2>
<small>
<?php the_time('F jS, Y') ?> by <?php the_author() ?>
</small>


Rearrange it so the time information goes in front (or in back) of your Post Title:

将它重新排列这样时间信息就会出现在你的文章标题的前面(或者后面):

<h2>
<a href="<?php the_permalink() ?>" rel="bookmark" 
title="Permanent Link to <?php the_title(); ?>">
<?php the_time('F jS, Y') ?> - <?php the_title(); ?></a>
</h2>
<small>
by <?php the_author() ?>
</small>


<h2>
<a href="<?php the_permalink() ?>" rel="bookmark" 
title="Permanent Link to <?php the_title(); ?>">
<?php the_time('F jS, Y') ?> - <?php the_title(); ?></a>
</h2>
<small>
by <?php the_author() ?>
</small>

See also:

也看看:


How do I change the "Permanent Link to" in my Title link?

我怎样在我的标题链接上更改"永久地链接到"?

The title of your links includes text that explains what the link is to, in concordance with web accessibility standards. By default, your title may look like this example, which uses the title attribute with the words "Permanent Link to" and the template tag that displays the title of the post. 你的链接标题包含文章,文章解释了这个链接到哪儿,与网络可访问性标准相融合。在默认情况下,你的标题也许看起来像这个例子,使用了标题加上单词"永久的链接到"和显示文章标题的模板标签。

<h2>
<a href="<?php the_permalink() ?>" rel="bookmark" 
title="Permanent Link to <?php the_title(); ?>">
<?php the_title(); ?></a>
</h2>
<h2>
<a href="<?php the_permalink() ?>" rel="bookmark" 
title="永久地链接到 <?php the_title(); ?>">
<?php the_title(); ?></a>
</h2>


To change the "Permanent Link to" text, simply delete it and replace it with your own words: 改变"永久地链接到"文章,只有删除它,并且将它替换为你自己的写的词就行了:

<h2>
<a href="<?php the_permalink() ?>" rel="bookmark" 
title="Post about <?php the_title(); ?>">
<?php the_title(); ?></a>
</h2>
<h2>
<a href="<?php the_permalink() ?>" rel="bookmark" 
title="文章关于 <?php the_title(); ?>">
<?php the_title(); ?></a>
</h2>


Or remove it completely, leaving only the title tag. 或者完全地把它删除,只留下标题标签。

<h2>
<a href="<?php the_permalink() ?>" rel="bookmark" 
title="<?php the_title(); ?>">
<?php the_title(); ?></a>
</h2>


<h2>
<a href="<?php the_permalink() ?>" rel="bookmark" 
标题="<?php the_title(); ?>">
<?php the_title(); ?></a>
</h2>


How do I make my Categories appear in alphabetical order?

我怎样使我的类别依照字母表顺序出现?

In some cases it may be necessary to change index.php. 有些情况下,可能有必要改变index.php

Find this line: 找到这一个行:

<?php list_cats(0, 'All', 'name'); ?>
<?php list_cats(0, 'All', 'name'); ?>


and replace it with this line instead: 将它改为这一行:

<?php list_cats(0,'','name','','',true,0,1,1,1); ?>


<?php list_cats(0,'','name','','',true,0,1,1,1); ?>


See also: 也看看:



How do I make my categories appear in a drop down list ?

我怎样在下拉列表中显示类别?

In some cases it may be necessary to change index.php. 有些情况下,可能有必要更改 index.php。 Find this line: 找一下这一行:

<?php list_cats(0, 'All', 'name'); ?>
<?php list_cats(0, 'All', 'name'); ?>


and replace it with this line instead: 将它替换为这一行:

<form action="<?php echo $PHP_SELF ?>" method="get">
<?php dropdown_cats(); ?>
<input type="submit" name="submit" value="view" />
</form>


<form action="<?php echo $PHP_SELF ?>" method="get">
<?php dropdown_cats(); ?>
<input type="submit" name="submit" value="view" />
</form>


See also: 也看看:


How do I exclude one or more categories from being listed in the list of categories?

我怎样在种类目录中清除一个或者更多的种类?

Use the following function to list your categories but exclude category 1: 使用下面的功能来列出你的类别但是要清除类别1:

<?php wp_list_cats('exclude=1'); ?>
<?php wp_list_cats('exclude=1'); ?>


Of course, change the 1 to the ID of the category you want to exclude. 当然,将1改为你想要清除的种类的ID. To exclude multiple categories, use this: 清除多个种类,请使用这个:

<?php wp_list_cats('exclude=1, 2'); ?>
<?php wp_list_cats('exclude=1, 2'); ?>


Change 1 and 2 to the categories you want excluded. You can exclude more of them by adding their IDs separated by commas.

将1和2改为你想要清除的种类。通过添加它们的ID,并且在ID中间加上逗号,你可以清除更多的。

See also: 也看看:


How do I hide a category from the front page index.php?

我怎样在第一页 index.php中隐藏种类?

If you need to exclude a category from the front page, you can place code that does the exclusion inside Wordpress:The Loop of your theme's index.php file.

如果你想在首页中排除种类,你可以将用于清除的代码放到你的主题的index.php 文件中的The Loop里面。


Wordpress:The Loop starts something like this: The Loop以像这样的一些东西开始:

<?php if (have_posts()) : while (have_posts()) : the_post(); ?>


<?php if (have_posts()) : while (have_posts()) : the_post(); ?>

To exclude category 4 from the front page, just inside Wordpress:The Loop, add this condition : 在首页中清除类别4,只要在The Loop里添加这个条件:

<?php if ( !(in_category('4')) || !is_home() ) { ?>
<!-- Output the post here -->


<?php if ( !(in_category('4')) || !is_home() ) { ?>

<!-- Output the post here -->

Wordpress:The Loop ends something like this: The Loop终止一些像这样的东西:

<?php endwhile; ?>

<?php endwhile; ?>


Just before that line, add this: 在这一行的前面,添加:

<?php } ?>


<?php } ?>

In the end, it will look like: 最后,它可能看起来像:

<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<?php if ( !(in_category('4')) || !is_home() ) { ?>
<!-- Output the post here -->
<?php } ?>
<?php endwhile; ?>


<?php if (have_posts()) : while (have_posts()) : the_post(); ?>

<?php if ( !(in_category('4')) || !is_home() ) { ?>
<!-- Output the post here -->
<?php } ?>
<?php endwhile; ?>


This means that if on the front page, the post will be presented if it's not in category 4. On pages other than the front ( home ) page, all posts are presented.

这意味着,如果文章不是在类别4里面,文章会在首页显现。除了首页(主页)以外的其它页面上,所有的文章都能显现。

See also:


也看看:

How do I make my Archives appear in a drop-down list?

我怎样使我的归档出现在一个下拉列表里面?

Put this code into your index.php where you wish the item to appear:

将这个代码放到你的index.php里,你希望你的条目出现的地方。

<li id="archives">Archives:
<ul>
<li><form name="archiveform" action="">
<select name="archive_chrono" onchange="window.location =
  (document.forms.archiveform.archive_chrono[document.forms.archiveform.archive_chrono.selectedIndex].value);">
<option value=''>By Month</option>
< ?php get_archives('','','option', 1); ?>
</></select>
</form>
</li>
</ul></li> 



<li id="archives">Archives:
<ul>
<li><form name="archiveform" action="">
<select name="archive_chrono" onchange="window.location =
  (document.forms.archiveform.archive_chrono[document.forms.archiveform.archive_chrono.selectedIndex].value);">
<option value=''>By Month</option>
< ?php get_archives('','','option', 1); ?>
</></select>
</form>
</li>
</ul></li> 


How can I customize the more tag?

我怎样定制更多的 标签?

See also: 也看看:


Templates

模板

Why can I see only n posts on the blog, where are the other entries?

为什么在博客上我只能看见n文章,其它的条目在哪儿?

Make sure that you have the correct settings in the Show at most posts or days fields in the Administration > Options > Reading Panel.

要确保你在管理 > 选项 > 阅读面板中的最多的显示'文章或者 时期领域中的设置是正确的。


If you are not seeing all your entries and you modified the default index.php, make sure you have an equal number of opening and closing tags, and that they are in the right places.

如果你没有看见你所有的条目,而且你更改了默认的index.php,确保你有同等数目的开与关的标签,而且它们所在位置是正确的。

How do I create an archives page, with all the entries sortable by different methods?

我怎样创建一个归档的页面,上面所有的条目通过不同的方法都可以归类?

See also: 也看看:



What do the _() and _e() functions in WordPress do?

WordPress中的 _()和 _e() 功能的用处是什么?

In the simplest of terms, they "print" what you tell them to do. They are abbreviations for the PHP term "echo" which displays text. In WordPress, they are used to identify strings in the php files marked for translation to other languages, and localization using two "tags" which are actually functions. They are:

  • __()
  • _e()

在最简单的术语中,它们"打印"你叫它们做的事。他们是PHP术语的缩写,"重复"文章中显示的内容。在WordPress中,它们被用来识别php文件中的命令行,php文件标志翻译到其它语言和使用两个"标签"定位,它们事实上是功能。它们是:

  • __()
  • _e()


These accept a string as an argument. For example: 这些接受一个字符串作为一个论据。例如:

__("Translate Me")
_e("Translate Me")

__("Translate Me")

_e("Translate Me")


The only functional difference between the two methods is that _e() echoes the string and () simply returns the string. () is used when you want to supply a string to a function. _e() is used when you want to output the string as part of your XHTML.

两种方法的唯一的功能上的区别是_e()重复了字符串而()只是返回了字符串。当你想要为一个功能提供一个字符串时,你使用()。当你想要拿出字符串作为你的XHTML的一部分时,你使用_e()。


We have a tool which goes through all of the php files, extracting strings that are marked by __() and _e().

我们有一个能够检查所有的php文件的工具,提取出所有的以__()_e()为标记的字符串。

See also: 也看看:


Themes

主题

How do I use a Theme style from Alex King’s site?

我怎样从Alex King的网站上使用一个主题形式?

See also: 也看看:



Which files do I modify when I start to design my site?

当我开始设计我的站点的时候,我需要改变哪个文件?

See also: 也看看:


How do you create a screenshot.png for your Theme?

你怎样为你的主题创建一个screenshot.png?

See also: 也看看:

Back to FAQ

返回到常见问题解答