站长百科 | 数字化技能提升教程 数字化时代生存宝典
首页
数字化百科
电子书
▼
建站程序
开发
服务器
办公软件
开发教程
▼
服务器教程
软件使用教程
运营教程
热门电子书
▼
CSS教程
WordPress教程
导航
程序频道
推广频道
网赚频道
人物频道
网站程序
网页制作
云计算
服务器
CMS
论坛
网店
虚拟主机
cPanel
网址导航
WIKI使用导航
WIKI首页
热点词条
最新资讯
网站程序
站长人物
页面分类
使用帮助
编辑测试
创建条目
网站地图
站长百科导航
站长百科
主机侦探
IDCtalk云说
跨境电商导航
WordPress啦
站长专题
网站推广
网站程序
网站赚钱
虚拟主机
cPanel
网址导航专题
云计算
微博营销
虚拟主机管理系统
开放平台
WIKI程序与应用
美国十大主机
编辑“
WordPress:Answers-Configuration
”
人物百科
|
营销百科
|
网赚百科
|
站长工具
|
网站程序
|
域名主机
|
互联网公司
|
分类索引
Xxf3325
(
讨论
|
贡献
)
2008年9月19日 (五) 09:37的版本
(新页面: <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...)
(差异) ←上一版本 |
最后版本
(
差异
) |
下一版本→
(
差异
)
跳转至:
导航
、
搜索
警告:您正在编辑的是本页面的旧版本。
如果您发布该更改,该版本后的所有更改都会丢失。
警告:
您没有登录。如果您做出任意编辑,您的IP地址将会公开可见。如果您
登录
或
创建
一个账户,您的编辑将归属于您的用户名,且将享受其他好处。
反垃圾检查。
不要
加入这个!
<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]]. </div> [[WordPress:FAQ|Back to FAQ]] == Formatting an Article's List of Categories == 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. 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>. == 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. == Stopping HTML in Comments == To prevent people from using HTML in comments, or to block particular HTML elements: # In the folder <tt>wp-includes</tt>, find the file <tt>kses.php</tt> and open it. # Find the text <tt>$allowedtags</tt>. It is followed by a list of the HTML elements allowed in comments. # 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). # 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>. == 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. == Finding the Absolute Path of a Page == To find the absolute path of a page, copy this text into a new text file: <?php $p = getcwd(); echo $p; ?> 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>). == 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'''. ; <tt>index.php</tt> : In combination with other PHP files (''see'' Template_Hierarchy), determines the overall HTML structure of each page. ; <tt>style.css</tt> : Controls fonts, colors, margins, backgrounds, and so on. ; <tt>wp-comments.php</tt> : Controls the layout of user-submitted comments and trackbacks, and the comments submission form. ; <tt>wp-comments-popup.php</tt> : Only needed if you show comments in a popup window (this option is off by default). == Showing Comments in Popup Windows == To open a popup window when someone clicks a comments link: === In WordPress 1.2 === Open <tt>index.php</tt> and find this line: <tt><?php //comments_popup_script(); // off by default ?></tt> Change it to: <tt><?php comments_popup_script(); // off by default ?></tt> === In WordPress 1.5 Using the "Classic" Theme === Open <tt>header.php</tt> and find this line: <tt><?php //comments_popup_script(); // off by default ?></tt> Change it to: <tt><?php comments_popup_script(); // off by default ?></tt> === In WordPress 1.5 Using the Default Theme === Open <tt>header.php</tt> and find this line: <tt><?php wp_get_archives('type=monthly&format=link'); ?></tt> Directly underneath it, ''add'' this line: <tt><?php comments_popup_script(); // off by default ?></tt> == Hiding your Site == 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. === Blocking IP addresses using Apache === 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. * [http://httpd.apache.org/docs/2.2/howto/access.html Tutorial on blocking IP addresses using <tt>.htaccess</tt>] 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. === Basic Authentication === To block people from accessing your site unless they enter the correct password: ==== Using Apache ==== * [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://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] ==== Using IIS === 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/kb/299970/EN-US/ How To Use NTFS Security to Protect a Web Page] * [http://support.microsoft.com/default.aspx?scid=kb;en-us;308160 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. === Search Engines: Spiders and 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>. * [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.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] == Letting People Upload Images == To permit image uploads to your site: # From the admin panel, go to '''Options''' → '''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]]. # In the main menu, you should now see a new '''Upload''' item between '''Options''' and '''Log Out'''. [[WordPress:FAQ|Back to FAQ]]
摘要:
请注意,您对站长百科的所有贡献都可能被其他贡献者编辑,修改或删除。如果您不希望您的文字被任意修改和再散布,请不要提交。
您同时也要向我们保证您所提交的内容是您自己所作,或得自一个不受版权保护或相似自由的来源(参阅
Wordpress-mediawiki:版权
的细节)。
未经许可,请勿提交受版权保护的作品!
取消
编辑帮助
(在新窗口中打开)