WIKI使用導(dǎo)航
站長百科導(dǎo)航
站長專題
- 網(wǎng)站推廣
- 網(wǎng)站程序
- 網(wǎng)站賺錢
- 虛擬主機(jī)
- cPanel
- 網(wǎng)址導(dǎo)航專題
- 云計算
- 微博營銷
- 虛擬主機(jī)管理系統(tǒng)
- 開放平臺
- WIKI程序與應(yīng)用
- 美國十大主機(jī)
WordPress: Answers-Configuration:修訂間差異
(新頁面: <div style="border:1px solid blue; background: #CCFFE6; padding:10px; margin:10px; font-size:130%"> These FAQs have been deprecated. You will find the new updated '''Frequently Asked Ques...) ? |
無編輯摘要 |
||
第1行: | 第1行: | ||
<div style="border:1px solid blue; background: #CCFFE6; padding:10px; margin:10px; font-size:130%"> | <div style="border:1px solid blue; background: #CCFFE6; padding:10px; margin:10px; font-size:130%"> | ||
<div style="border:1px solid blue; background: #CCFFE6; padding:10px; margin:10px; font-size:130%"> | |||
These FAQs have been deprecated. You will find the new updated '''Frequently Asked Questions''' on the new pages for the [[WordPress:FAQ]]. | These FAQs have been deprecated. You will find the new updated '''Frequently Asked Questions''' on the new pages for the [[WordPress:FAQ]]. | ||
</div> | |||
這些常見問題解答已經(jīng)取消了。你在[[WordPress:FAQ|常見問題解答]]的新的頁面上會看到新的已更新的'''常見問題解答'''。 | |||
</div> | </div> | ||
[[WordPress:FAQ|Back to FAQ]] | [[WordPress:FAQ|Back to FAQ]] | ||
[[WordPress:FAQ|返回到常見問題解答]] | |||
== Formatting an Article's List of Categories == | == Formatting an Article's List of Categories == | ||
== 設(shè)計文章的類別列表的格式== | |||
To configure the way a post's categories display, open the <tt>index.php</tt> file and find the text <tt><?php the_category(</tt>. Immediately after that bracket, inside quote marks, is the text that goes between each of the categories if you apply multiple categories to a post. | To configure the way a post's categories display, open the <tt>index.php</tt> file and find the text <tt><?php the_category(</tt>. Immediately after that bracket, inside quote marks, is the text that goes between each of the categories if you apply multiple categories to a post. | ||
要配置文章類別的顯示方式,請打開<tt>index.php</tt>文件并且找到文本the_category(</tt>。自傲那個括號的后面,在引號的立馬,是每個類別之間的文本,如果你將一篇文章歸為多個類別。 | |||
WordPress doesn't add spaces to the separators, so if you want them, add them yourself. For example, if you want categories to be separated with commas, use <tt> <?php the_category(', ')</tt> rather than just <tt><?php the_category(',')</tt>. Similarly, if you want categories to be separated with bullets, you might use <tt><?php the_category(' &bull; ')</tt>. | WordPress doesn't add spaces to the separators, so if you want them, add them yourself. For example, if you want categories to be separated with commas, use <tt> <?php the_category(', ')</tt> rather than just <tt><?php the_category(',')</tt>. Similarly, if you want categories to be separated with bullets, you might use <tt><?php the_category(' &bull; ')</tt>. | ||
WordPress不會給分隔符添加空格,如果你想要空格,你可以自己添加。例如,如果你希望用逗號將類別分開,請使用<tt> <?php the_category(', ')</tt>而不僅僅是 <tt><?php the_category(',')</tt>。與此類似,如果你希望使用bullets分開類別,你可以使用<tt><?php the_category(' &bull; ')</tt>。 | |||
== If Too Many Comments Go to Your Moderation Queue == | == If Too Many Comments Go to Your Moderation Queue == | ||
== 如果我的審核隊列中排了太多的評論== | |||
If almost every comment anyone submits ends up in your moderation queue, there's probably a problem with your '''spam words''' list. Check the list under '''Options''' → '''Discussion''' carefully to ensure it doesn't have any items consisting of a single character, a blank line, or other whitespace. Sometimes blank lines can be introduced by spam plugins. | If almost every comment anyone submits ends up in your moderation queue, there's probably a problem with your '''spam words''' list. Check the list under '''Options''' → '''Discussion''' carefully to ensure it doesn't have any items consisting of a single character, a blank line, or other whitespace. Sometimes blank lines can be introduced by spam plugins. | ||
如果任何人遞交的評論都出現(xiàn)在你的審核隊列中,這可能是你的'''垃圾廣告詞'''列表方面的問題。在'''選項(xiàng)''' → '''討論'''下面仔細(xì)地查看列表,確保列表上沒有什么內(nèi)容包含單一的字符,空白的行,或者其它的空格。有時候,反垃圾廣告插件可能會帶入一些空白的行。 | |||
== Stopping HTML in Comments == | == Stopping HTML in Comments == | ||
== 阻止評論中的HTML == | |||
To prevent people from using HTML in comments, or to block particular HTML elements: | To prevent people from using HTML in comments, or to block particular HTML elements: | ||
要阻止人們在評論中使用HTML,或者阻止特別的HTML元素: | |||
# In the folder <tt>wp-includes</tt>, find the file <tt>kses.php</tt> and open it. | # In the folder <tt>wp-includes</tt>, find the file <tt>kses.php</tt> and open it. | ||
#在文件夾<tt>wp-includes</tt>中,找到文件<tt>kses.php</tt>并且打開文件。 | |||
# Find the text <tt>$allowedtags</tt>. It is followed by a list of the HTML elements allowed in comments. | # Find the text <tt>$allowedtags</tt>. It is followed by a list of the HTML elements allowed in comments. | ||
#找到文本<tt>$allowedtags</tt>。文本后面帶有評論中允許的HTML內(nèi)容列表。 | |||
# To prevent a partiular HTML element from being used, comment out the line for that element. To comment out a line, type <tt>//</tt> at the start of the line (some elements will probably be commented out already). | # To prevent a partiular HTML element from being used, comment out the line for that element. To comment out a line, type <tt>//</tt> at the start of the line (some elements will probably be commented out already). | ||
#要阻止使用某個特別的HTML內(nèi)容,為那個內(nèi)容comment out the line 。要comment out a line,請在行的開頭輸入<tt>//</tt>(一些內(nèi)容可能已經(jīng)commented out(刪除了))。 | |||
# If you never want any HTML in comments at all, you can delete the whole function -- from <tt>if (!CUSTOM_TAGS)</tt> to the next <tt>}</tt> -- but if you change your mind later, you'll need to get a new copy of <tt>kses.php</tt>. | # If you never want any HTML in comments at all, you can delete the whole function -- from <tt>if (!CUSTOM_TAGS)</tt> to the next <tt>}</tt> -- but if you change your mind later, you'll need to get a new copy of <tt>kses.php</tt>. | ||
#如果你不希望評論中擁有任何HTML內(nèi)容,你可以刪除整個函數(shù)—從(!CUSTOM_TAGS)</tt> 到下一個<tt>}</tt> --但是如果你又改變了注意,你需要得到<tt>kses.php</tt>的新復(fù)本。 | |||
== Changing the Admin Name == | == Changing the Admin Name == | ||
== 更改管理員名稱 == | |||
To change the name of the WordPress admin account, log in to WordPress as admin, then choose '''Users'''. Under '''Your Profile''' you can enter your first name, last name, and nickname. | To change the name of the WordPress admin account, log in to WordPress as admin, then choose '''Users'''. Under '''Your Profile''' you can enter your first name, last name, and nickname. | ||
要更改WordPress管理員帳戶,請作為管理員登錄到WordPress,然后選擇'''用戶'''。在'''你的基本資料'''下面,你可以輸入你的姓名或者昵稱。 | |||
== Finding the Absolute Path of a Page == | == Finding the Absolute Path of a Page == | ||
== 找到網(wǎng)頁的絕對路徑== | |||
To find the absolute path of a page, copy this text into a new text file: | To find the absolute path of a page, copy this text into a new text file: | ||
要找到網(wǎng)頁的絕對路徑,將這個文本復(fù)制到新的文本文件中: | |||
? <?php | ? <?php | ||
$p = getcwd(); | |||
echo $p; | |||
?> | |||
<?php | |||
? $p = getcwd(); | ? $p = getcwd(); | ||
? echo $p; | ? echo $p; | ||
第35行: | 第85行: | ||
Save the file as <tt>path.php</tt>. Then open it in a Web browser (for example, <tt>http://www.example.com/images/path.php</tt>). | Save the file as <tt>path.php</tt>. Then open it in a Web browser (for example, <tt>http://www.example.com/images/path.php</tt>). | ||
將文本保存為<tt>path.php</tt>。然后在網(wǎng)絡(luò)瀏覽器中打開文件(如,<tt>http://www.example.com/images/path.php</tt>)。 | |||
== Files Affecting Weblog Display == | == Files Affecting Weblog Display == | ||
==影響博客顯示的文件 == | |||
These are the main files affecting the display of your site. They can be edited from the WordPress control panel under '''Presentation''' → '''Theme Editor'''. | These are the main files affecting the display of your site. They can be edited from the WordPress control panel under '''Presentation''' → '''Theme Editor'''. | ||
有一些主要的文件影響你的站點(diǎn)的顯示情況??梢栽赪ordPress控制面板下面的'''呈現(xiàn)''' → '''主題編輯器'''中更改這些文件。 | |||
; <tt>index.php</tt> : In combination with other PHP files (''see'' Template_Hierarchy), determines the overall HTML structure of each page. | ; <tt>index.php</tt> : In combination with other PHP files (''see'' Template_Hierarchy), determines the overall HTML structure of each page. | ||
; <tt>index.php</tt> :與其它PHP文件相結(jié)合(''請看看'' Template_Hierarchy),決定每個頁面的HTML結(jié)構(gòu)的整體結(jié)構(gòu)。 | |||
; <tt>style.css</tt> : Controls fonts, colors, margins, backgrounds, and so on. | ; <tt>style.css</tt> : Controls fonts, colors, margins, backgrounds, and so on. | ||
; <tt>style.css</tt> :控制字體,顏色,頁邊空白,背景,等等。 | |||
; <tt>wp-comments.php</tt> : Controls the layout of user-submitted comments and trackbacks, and the comments submission form. | ; <tt>wp-comments.php</tt> : Controls the layout of user-submitted comments and trackbacks, and the comments submission form. | ||
; <tt>wp-comments.php</tt> :控制用戶遞交的評論和trackbacks,和評論遞交形式的布局。 | |||
; <tt>wp-comments-popup.php</tt> : Only needed if you show comments in a popup window (this option is off by default). | ; <tt>wp-comments-popup.php</tt> : Only needed if you show comments in a popup window (this option is off by default). | ||
; <tt>wp-comments-popup.php</tt> :如果你在彈出的窗口中顯示評論,才需要這個文件(默認(rèn)情況下,這個選項(xiàng)是關(guān)閉的)。 | |||
== Showing Comments in Popup Windows == | == Showing Comments in Popup Windows == | ||
== 在彈出的窗口中顯示評論== | |||
To open a popup window when someone clicks a comments link: | To open a popup window when someone clicks a comments link: | ||
但有人點(diǎn)擊評論鏈接的時候,打開彈出的窗口: | |||
=== In WordPress 1.2 === | === In WordPress 1.2 === | ||
Open <tt>index.php</tt> and find this line: | === 在 WordPress 1.2 中=== | ||
? | |||
Open <tt>index.php</tt> and find this line:‘ | |||
? | |||
打開<tt>index.php</tt>并且找到這一行: | |||
? | |||
? <tt><?php //comments_popup_script(); // off by default ?></tt> | ? <tt><?php //comments_popup_script(); // off by default ?></tt> | ||
Change it to: | Change it to: | ||
? <tt><?php comments_popup_script(); // off by default ?></tt> | ? <tt><?php comments_popup_script(); // off by default ?></tt> | ||
<tt><?php //comments_popup_script(); // 默認(rèn)情況下關(guān)閉 ?></tt> | |||
更改為: | |||
<tt><?php comments_popup_script(); // 默認(rèn)情況下關(guān)閉?></tt> | |||
=== In WordPress 1.5 Using the "Classic" Theme === | === In WordPress 1.5 Using the "Classic" Theme === | ||
=== 在WordPress 1.5 中,使用"經(jīng)典" 主題 === | |||
Open <tt>header.php</tt> and find this line: | Open <tt>header.php</tt> and find this line: | ||
打開<tt>header.php</tt>并且找打這一行: | |||
? <tt><?php //comments_popup_script(); // off by default ?></tt> | ? <tt><?php //comments_popup_script(); // off by default ?></tt> | ||
Change it to: | Change it to: | ||
? <tt><?php comments_popup_script(); // off by default ?></tt> | ? <tt><?php comments_popup_script(); // off by default ?></tt> | ||
<tt><?php //comments_popup_script(); //默認(rèn)情況下,關(guān)閉 ?></tt> | |||
更改為: | |||
<tt><?php comments_popup_script(); //默認(rèn)情況下,關(guān)閉?></tt> | |||
=== In WordPress 1.5 Using the Default Theme === | === In WordPress 1.5 Using the Default Theme === | ||
=== 在 WordPress 1.5中,使用默認(rèn)主題 === | |||
Open <tt>header.php</tt> and find this line: | Open <tt>header.php</tt> and find this line: | ||
打開<tt>header.php</tt>并且找到這一行: | |||
? <tt><?php wp_get_archives('type=monthly&format=link'); ?></tt> | ? <tt><?php wp_get_archives('type=monthly&format=link'); ?></tt> | ||
Directly underneath it, ''add'' this line: | Directly underneath it, ''add'' this line: | ||
? <tt><?php comments_popup_script(); // off by default ?></tt> | ? <tt><?php comments_popup_script(); // off by default ?></tt> | ||
<tt><?php wp_get_archives('type=monthly&format=link'); ?></tt> | |||
在這一行的下面,直接地''添加'' 這一行: | |||
<tt><?php comments_popup_script(); // 默認(rèn)情況下,關(guān)閉 ?></tt> | |||
== Hiding your Site == | == Hiding your Site == | ||
== 隱藏你的站點(diǎn) == | |||
Whether you're testing a new version of WP, setting up a new blog or have some other reason to limit access, the following information may help you keep unwanted visitors out. | Whether you're testing a new version of WP, setting up a new blog or have some other reason to limit access, the following information may help you keep unwanted visitors out. | ||
不管你是否測試新版本的WP,設(shè)置新的博客,或者因?yàn)橐恍┢渌?,需要限制?quán)限,下面的信息,會幫助你阻止不必要的訪客訪問。 | |||
=== Blocking IP addresses using Apache === | === Blocking IP addresses using Apache === | ||
=== 使用Apache阻止IP地址=== | |||
You can use the <tt>.htaccess</tt> file (which also contains your permalink code) to check for certain IP addresses and prevent them from viewing your site. This will only stop the IP address, not the person, so if they can switch to an IP address not in your blacklist, they will still be able to get to your site. | You can use the <tt>.htaccess</tt> file (which also contains your permalink code) to check for certain IP addresses and prevent them from viewing your site. This will only stop the IP address, not the person, so if they can switch to an IP address not in your blacklist, they will still be able to get to your site. | ||
你可以使用<tt>.htaccess</tt>文件(這個文件也包含你的permalink代碼)能夠阻止一些IP地址,阻止訪客訪問你的站點(diǎn)。這只能夠阻止IP地址,但是并不能阻止人,因此如果訪客更改為一個不屬于你的黑名單中的IP地址,這樣訪客仍然能夠訪問你的站點(diǎn)。 | |||
* [http://httpd.apache.org/docs/2.2/howto/access.html? Tutorial on blocking IP addresses using <tt>.htaccess</tt>] | * [http://httpd.apache.org/docs/2.2/howto/access.html? Tutorial on blocking IP addresses using <tt>.htaccess</tt>] | ||
* [http://httpd.apache.org/docs/2.2/howto/access.html? 使用 <tt>.htaccess</tt>阻止IP地址指南] | |||
An <tt>.htaccess</tt> file can also be used to prevent people from "hot-linking" to your images (bandwidth theft), or to set up a password-protected site. | An <tt>.htaccess</tt> file can also be used to prevent people from "hot-linking" to your images (bandwidth theft), or to set up a password-protected site. | ||
也可以使用<tt>.htaccess</tt>文件阻止人們"熱點(diǎn)鏈接" 到你的圖像(帶寬偷竊),或者幫你設(shè)置密碼保護(hù)的站點(diǎn)。 | |||
=== Basic Authentication === | === Basic Authentication === | ||
=== 基本的鑒定=== | |||
To block people from accessing your site unless they enter the correct password: | To block people from accessing your site unless they enter the correct password: | ||
除非人們輸入正確的密碼,否則阻止人們訪問你的站點(diǎn)。 | |||
==== Using Apache ==== | ==== Using Apache ==== | ||
==== 使用 Apache ==== | |||
* [http://codex.wordpress.org/Glossary#.htaccess .htaccess Definition] | * [http://codex.wordpress.org/Glossary#.htaccess .htaccess Definition] | ||
* [http://www.askapache.com/htaccess/apache-htaccess.html Huge list of Apache <tt>.htaccess</tt> examples] | * [http://www.askapache.com/htaccess/apache-htaccess.html Huge list of Apache <tt>.htaccess</tt> examples] | ||
* [http://httpd.apache.org/docs/2.2/howto/access.html? Tutorial on access control using <tt>.htpasswd</tt>] | * [http://httpd.apache.org/docs/2.2/howto/access.html? Tutorial on access control using <tt>.htpasswd</tt>] | ||
* [http://www.clockwatchers.com/htaccess_tool.html? Clockwatchers.com .htaccess And .htpasswd tools] | * [http://www.clockwatchers.com/htaccess_tool.html? Clockwatchers.com .htaccess And .htpasswd tools] | ||
* [http://codex.wordpress.org/Glossary#.htaccess .htaccess 定義] | |||
* [http://www.askapache.com/htaccess/apache-htaccess.html Apache <tt>.htaccess</tt> 例子列表] | |||
* [http://httpd.apache.org/docs/2.2/howto/access.html? 使用 <tt>.htpasswd</tt>控制權(quán)限指南] | |||
* [http://www.clockwatchers.com/htaccess_tool.html? Clockwatchers.com .htaccess 和 .htpasswd 工具] | |||
==== Using IIS === | ==== Using IIS === | ||
==== 使用 IIS === | |||
Deselect "Allow Anonymous Access" and select "Basic Authentication". You'll also need to have a username with a password. | Deselect "Allow Anonymous Access" and select "Basic Authentication". You'll also need to have a username with a password. | ||
取消選定"允許匿名訪問"并且選擇"基本的鑒定"。你需要有個帶有密碼的用戶名。 | |||
* [http://support.microsoft.com/default.aspx?scid=kb;en-us;310344? How To Configure IIS 5.0 Web Site Authentication] | * [http://support.microsoft.com/default.aspx?scid=kb;en-us;310344? How To Configure IIS 5.0 Web Site Authentication] | ||
第103行: | 第226行: | ||
* [http://support.microsoft.com/default.aspx?scid=kb;en-us;308160? HOW TO: Configure Internet Information Services Web Authentication] | * [http://support.microsoft.com/default.aspx?scid=kb;en-us;308160? HOW TO: Configure Internet Information Services Web Authentication] | ||
* [http://support.microsoft.com/default.aspx?scid=kb;en-us;310344? 怎樣配置IIS 5.0網(wǎng)站鑒定] | |||
* [http://support.microsoft.com/kb/299970/EN-US/ 怎樣使用NTFS 安全來包含網(wǎng)頁] | |||
* [http://support.microsoft.com/default.aspx?scid=kb;en-us;308160? 怎樣:配置因特網(wǎng)信息服務(wù)網(wǎng)絡(luò)鑒定] | |||
==== Warning ==== | ==== Warning ==== | ||
==== 提醒 ==== | |||
With basic authentication, the password is encoded weakly (using base-64), and can be easily intercepted and decoded. | With basic authentication, the password is encoded weakly (using base-64), and can be easily intercepted and decoded. | ||
擁有基本的鑒定,密碼編碼不強(qiáng)(使用base-64),會輕易地破解。 | |||
=== Search Engines: Spiders and Bots === | === Search Engines: Spiders and Bots === | ||
=== 搜索引擎: Spiders 和 Bots === | |||
Search engines will index your site and keep their own temporary copy of it for use in returning search results. If you do not want this to happen, use a file called <tt>robots.txt</tt>. | Search engines will index your site and keep their own temporary copy of it for use in returning search results. If you do not want this to happen, use a file called <tt>robots.txt</tt>. | ||
搜索引擎會索引你的站點(diǎn)并且在搜索結(jié)果中保存自己臨時的備份。如果你不希望發(fā)生這種情況,請使用稱為<tt>robots.txt</tt>的文件。 | |||
* [http://www.askapache.com/seo/updated-robotstxt-for-wordpress.html Sample <tt>robots.txt</tt> optimized for SEO] | * [http://www.askapache.com/seo/updated-robotstxt-for-wordpress.html Sample <tt>robots.txt</tt> optimized for SEO] | ||
* [http://www.twentysteps.com/creating-the-ultimate-wordpress-robotstxt-file/ Creating the ultimate <tt>robots.txt</tt>] | * [http://www.twentysteps.com/creating-the-ultimate-wordpress-robotstxt-file/ Creating the ultimate <tt>robots.txt</tt>] | ||
* [http://www.askapache.com/seo/wordpress-robotstxt-optimized-for-seo.html SEO Optimized <tt>robots.txt</tt> and robots meta for WordPress] | * [http://www.askapache.com/seo/wordpress-robotstxt-optimized-for-seo.html SEO Optimized <tt>robots.txt</tt> and robots meta for WordPress] | ||
* [http://www.google.com/support/webmasters/bin/answer.py?answer=40361 Google information about robots.txt] | * [http://www.google.com/support/webmasters/bin/answer.py?answer=40361 Google information about robots.txt] | ||
* [http://www.askapache.com/seo/updated-robotstxt-for-wordpress.html Sample <tt>robots.txt</tt> optimized for SEO] | |||
* [http://www.twentysteps.com/creating-the-ultimate-wordpress-robotstxt-file/ 創(chuàng)建最終的 <tt>robots.txt</tt>] | |||
* [http://www.askapache.com/seo/wordpress-robotstxt-optimized-for-seo.html SEO Optimized <tt>robots.txt</tt> and robots meta for WordPress] | |||
* [http://www.google.com/support/webmasters/bin/answer.py?answer=40361 Google 關(guān)于 robots.txt的信息] | |||
== Letting People Upload Images == | == Letting People Upload Images == | ||
== 使得其他人上傳圖像== | |||
To permit image uploads to your site: | To permit image uploads to your site: | ||
允許圖像上傳到你的站點(diǎn)上: | |||
# From the admin panel, go to '''Options''' → '''Miscellaneous'''. | # From the admin panel, go to '''Options''' → '''Miscellaneous'''. | ||
#從管理面板中,進(jìn)入'''選項(xiàng)''' → '''Miscellaneous'''。 | |||
# Select '''Allow File Uploads'''. For help finding the absolute path, see [[WordPress:Answers-Configuration#Absolute_Path | Absolute Path]]. For help changing permissions, see [[WordPress:Changing_File_Permissions]]. | # Select '''Allow File Uploads'''. For help finding the absolute path, see [[WordPress:Answers-Configuration#Absolute_Path | Absolute Path]]. For help changing permissions, see [[WordPress:Changing_File_Permissions]]. | ||
#選擇'''允許文件上傳'''。為了幫助找到絕對路徑,請看看[[WordPress:Answers-Configuration#Absolute_Path | 絕對路徑]]。關(guān)于更改權(quán)限的幫助,請看看[[WordPress:Changing_File_Permissions| Changing_File_Permissions]]。 | |||
# In the main menu, you should now see a new '''Upload''' item between '''Options''' and '''Log Out'''. | # In the main menu, you should now see a new '''Upload''' item between '''Options''' and '''Log Out'''. | ||
#在主要的菜單上,你應(yīng)該在'''選項(xiàng)'''和'''退出'''之間看到新的'''上傳'''內(nèi)容。 | |||
[[WordPress:FAQ|Back to FAQ]] | [[WordPress:FAQ|Back to FAQ]] | ||
[[WordPress:FAQ|返回到常見問題解答]] |
2008年9月22日 (一) 15:01的版本
These FAQs have been deprecated. You will find the new updated Frequently Asked Questions on the new pages for the WordPress:FAQ.
這些常見問題解答已經(jīng)取消了。你在常見問題解答的新的頁面上會看到新的已更新的常見問題解答。
Formatting an Article's List of Categories
設(shè)計文章的類別列表的格式
To configure the way a post's categories display, open the index.php file and find the text <?php the_category(. Immediately after that bracket, inside quote marks, is the text that goes between each of the categories if you apply multiple categories to a post.
要配置文章類別的顯示方式,請打開index.php文件并且找到文本the_category(。自傲那個括號的后面,在引號的立馬,是每個類別之間的文本,如果你將一篇文章歸為多個類別。
WordPress doesn't add spaces to the separators, so if you want them, add them yourself. For example, if you want categories to be separated with commas, use <?php the_category(', ') rather than just <?php the_category(','). Similarly, if you want categories to be separated with bullets, you might use <?php the_category(' • ').
WordPress不會給分隔符添加空格,如果你想要空格,你可以自己添加。例如,如果你希望用逗號將類別分開,請使用 <?php the_category(', ')而不僅僅是 <?php the_category(',')。與此類似,如果你希望使用bullets分開類別,你可以使用<?php the_category(' • ')。
If Too Many Comments Go to Your Moderation Queue
如果我的審核隊列中排了太多的評論
If almost every comment anyone submits ends up in your moderation queue, there's probably a problem with your spam words list. Check the list under Options → Discussion carefully to ensure it doesn't have any items consisting of a single character, a blank line, or other whitespace. Sometimes blank lines can be introduced by spam plugins.
如果任何人遞交的評論都出現(xiàn)在你的審核隊列中,這可能是你的垃圾廣告詞列表方面的問題。在選項(xiàng) → 討論下面仔細(xì)地查看列表,確保列表上沒有什么內(nèi)容包含單一的字符,空白的行,或者其它的空格。有時候,反垃圾廣告插件可能會帶入一些空白的行。
Stopping HTML in Comments
阻止評論中的HTML
To prevent people from using HTML in comments, or to block particular HTML elements:
要阻止人們在評論中使用HTML,或者阻止特別的HTML元素:
- In the folder wp-includes, find the file kses.php and open it.
- 在文件夾wp-includes中,找到文件kses.php并且打開文件。
- Find the text $allowedtags. It is followed by a list of the HTML elements allowed in comments.
- 找到文本$allowedtags。文本后面帶有評論中允許的HTML內(nèi)容列表。
- To prevent a partiular HTML element from being used, comment out the line for that element. To comment out a line, type // at the start of the line (some elements will probably be commented out already).
- 要阻止使用某個特別的HTML內(nèi)容,為那個內(nèi)容comment out the line 。要comment out a line,請在行的開頭輸入//(一些內(nèi)容可能已經(jīng)commented out(刪除了))。
- If you never want any HTML in comments at all, you can delete the whole function -- from if (!CUSTOM_TAGS) to the next } -- but if you change your mind later, you'll need to get a new copy of kses.php.
- 如果你不希望評論中擁有任何HTML內(nèi)容,你可以刪除整個函數(shù)—從(!CUSTOM_TAGS) 到下一個} --但是如果你又改變了注意,你需要得到kses.php的新復(fù)本。
Changing the Admin Name
更改管理員名稱
To change the name of the WordPress admin account, log in to WordPress as admin, then choose Users. Under Your Profile you can enter your first name, last name, and nickname.
要更改WordPress管理員帳戶,請作為管理員登錄到WordPress,然后選擇用戶。在你的基本資料下面,你可以輸入你的姓名或者昵稱。
Finding the Absolute Path of a Page
找到網(wǎng)頁的絕對路徑
To find the absolute path of a page, copy this text into a new text file:
要找到網(wǎng)頁的絕對路徑,將這個文本復(fù)制到新的文本文件中:
<?php $p = getcwd(); echo $p; ?>
<?php
$p = getcwd(); echo $p; ?>
Save the file as path.php. Then open it in a Web browser (for example, http://www.example.com/images/path.php).
將文本保存為path.php。然后在網(wǎng)絡(luò)瀏覽器中打開文件(如,http://www.example.com/images/path.php)。
Files Affecting Weblog Display
影響博客顯示的文件
These are the main files affecting the display of your site. They can be edited from the WordPress control panel under Presentation → Theme Editor.
有一些主要的文件影響你的站點(diǎn)的顯示情況??梢栽赪ordPress控制面板下面的呈現(xiàn) → 主題編輯器中更改這些文件。
- index.php
- In combination with other PHP files (see Template_Hierarchy), determines the overall HTML structure of each page.
- index.php
- 與其它PHP文件相結(jié)合(請看看 Template_Hierarchy),決定每個頁面的HTML結(jié)構(gòu)的整體結(jié)構(gòu)。
- style.css
- Controls fonts, colors, margins, backgrounds, and so on.
- style.css
- 控制字體,顏色,頁邊空白,背景,等等。
- wp-comments.php
- Controls the layout of user-submitted comments and trackbacks, and the comments submission form.
- wp-comments.php
- 控制用戶遞交的評論和trackbacks,和評論遞交形式的布局。
- wp-comments-popup.php
- Only needed if you show comments in a popup window (this option is off by default).
- wp-comments-popup.php
- 如果你在彈出的窗口中顯示評論,才需要這個文件(默認(rèn)情況下,這個選項(xiàng)是關(guān)閉的)。
Showing Comments in Popup Windows
在彈出的窗口中顯示評論
To open a popup window when someone clicks a comments link:
但有人點(diǎn)擊評論鏈接的時候,打開彈出的窗口:
In WordPress 1.2
在 WordPress 1.2 中
Open index.php and find this line:‘
打開index.php并且找到這一行:
<?php //comments_popup_script(); // off by default ?>
Change it to:
<?php comments_popup_script(); // off by default ?>
<?php //comments_popup_script(); // 默認(rèn)情況下關(guān)閉 ?> 更改為:
<?php comments_popup_script(); // 默認(rèn)情況下關(guān)閉?>
In WordPress 1.5 Using the "Classic" Theme
在WordPress 1.5 中,使用"經(jīng)典" 主題
Open header.php and find this line:
打開header.php并且找打這一行:
<?php //comments_popup_script(); // off by default ?>
Change it to:
<?php comments_popup_script(); // off by default ?>
<?php //comments_popup_script(); //默認(rèn)情況下,關(guān)閉 ?> 更改為:
<?php comments_popup_script(); //默認(rèn)情況下,關(guān)閉?>
In WordPress 1.5 Using the Default Theme
在 WordPress 1.5中,使用默認(rèn)主題
Open header.php and find this line:
打開header.php并且找到這一行:
<?php wp_get_archives('type=monthly&format=link'); ?>
Directly underneath it, add this line:
<?php comments_popup_script(); // off by default ?>
<?php wp_get_archives('type=monthly&format=link'); ?> 在這一行的下面,直接地添加 這一行:
<?php comments_popup_script(); // 默認(rèn)情況下,關(guān)閉 ?>
Hiding your Site
隱藏你的站點(diǎn)
Whether you're testing a new version of WP, setting up a new blog or have some other reason to limit access, the following information may help you keep unwanted visitors out.
不管你是否測試新版本的WP,設(shè)置新的博客,或者因?yàn)橐恍┢渌?,需要限制?quán)限,下面的信息,會幫助你阻止不必要的訪客訪問。
Blocking IP addresses using Apache
使用Apache阻止IP地址
You can use the .htaccess file (which also contains your permalink code) to check for certain IP addresses and prevent them from viewing your site. This will only stop the IP address, not the person, so if they can switch to an IP address not in your blacklist, they will still be able to get to your site.
你可以使用.htaccess文件(這個文件也包含你的permalink代碼)能夠阻止一些IP地址,阻止訪客訪問你的站點(diǎn)。這只能夠阻止IP地址,但是并不能阻止人,因此如果訪客更改為一個不屬于你的黑名單中的IP地址,這樣訪客仍然能夠訪問你的站點(diǎn)。
An .htaccess file can also be used to prevent people from "hot-linking" to your images (bandwidth theft), or to set up a password-protected site.
也可以使用.htaccess文件阻止人們"熱點(diǎn)鏈接" 到你的圖像(帶寬偷竊),或者幫你設(shè)置密碼保護(hù)的站點(diǎn)。
Basic Authentication
基本的鑒定
To block people from accessing your site unless they enter the correct password:
除非人們輸入正確的密碼,否則阻止人們訪問你的站點(diǎn)。
Using Apache
使用 Apache
- .htaccess Definition
- Huge list of Apache .htaccess examples
- Tutorial on access control using .htpasswd
- Clockwatchers.com .htaccess And .htpasswd tools
- .htaccess 定義
- Apache .htaccess 例子列表
- 使用 .htpasswd控制權(quán)限指南
- Clockwatchers.com .htaccess 和 .htpasswd 工具
= Using IIS
= 使用 IIS
Deselect "Allow Anonymous Access" and select "Basic Authentication". You'll also need to have a username with a password.
取消選定"允許匿名訪問"并且選擇"基本的鑒定"。你需要有個帶有密碼的用戶名。
- How To Configure IIS 5.0 Web Site Authentication
- How To Use NTFS Security to Protect a Web Page
- HOW TO: Configure Internet Information Services Web Authentication
Warning
提醒
With basic authentication, the password is encoded weakly (using base-64), and can be easily intercepted and decoded.
擁有基本的鑒定,密碼編碼不強(qiáng)(使用base-64),會輕易地破解。
Search Engines: Spiders and Bots
搜索引擎: Spiders 和 Bots
Search engines will index your site and keep their own temporary copy of it for use in returning search results. If you do not want this to happen, use a file called robots.txt.
搜索引擎會索引你的站點(diǎn)并且在搜索結(jié)果中保存自己臨時的備份。如果你不希望發(fā)生這種情況,請使用稱為robots.txt的文件。
- Sample robots.txt optimized for SEO
- Creating the ultimate robots.txt
- SEO Optimized robots.txt and robots meta for WordPress
- Google information about robots.txt
- Sample robots.txt optimized for SEO
- 創(chuàng)建最終的 robots.txt
- SEO Optimized robots.txt and robots meta for WordPress
- Google 關(guān)于 robots.txt的信息
Letting People Upload Images
使得其他人上傳圖像
To permit image uploads to your site:
允許圖像上傳到你的站點(diǎn)上:
- From the admin panel, go to Options → Miscellaneous.
- 從管理面板中,進(jìn)入選項(xiàng) → Miscellaneous。
- Select Allow File Uploads. For help finding the absolute path, see Absolute Path. For help changing permissions, see WordPress:Changing_File_Permissions.
- 選擇允許文件上傳。為了幫助找到絕對路徑,請看看 絕對路徑。關(guān)于更改權(quán)限的幫助,請看看 Changing_File_Permissions。
- In the main menu, you should now see a new Upload item between Options and Log Out.
- 在主要的菜單上,你應(yīng)該在選項(xiàng)和退出之間看到新的上傳內(nèi)容。