跳到主要内容

网站CMS中wp-content目录文件

wp-content目录

WordPress并不更新这个目录。/wp-content/ 目录由用户本人来提供内容。除非要把默认主题升级到最新版本,否则,升级过程中也应避开这部分内容。WordPress主题和插件都存储在这个目录下。

wp-content/plugins目录

WordPress的所有插件都存放在这个目录下。WordPress的默认插件是为插件开发者所作的示例插件,即Hello Dolly插件,它会随机显示”Hello Dolly.”这首歌的歌词。当前版本也包括了反垃圾评论插件。

  1. wp-content/plugins/hello.php
  2. wp-content/plugins/akismet.php

wp-content/themes目录

WordPress所有的主题数据都存放在这个目录下各自的文件夹中,如example.com/wp-content/themes/themedirectory/

wp-content/themes/themedir目录

WordPress主题的相关文件都存放在它们各自的目录下,即wp-content/themes/themedir目录。下面我们以WordPress默认主题文件为例,默认主题在/wp-content/themes/default/下包括的文件有:

  1. wp-content/themes/themedir/comments.php:用来管理如何显示评论。
  2. wp-content/themes/themedir/footer.php:用来管理页面的页脚。
  3. wp-content/themes/themedir/header.php:用来管理每个页面的页头。
  4. wp-content/themes/themedir/index.php:用来管理首页的日志显示布局。
  5. wp-content/themes/themedir/search.php:用来显示搜索表单。
  6. wp-content/themes/themedir/sidebar.php:用来管理侧边栏。
  7. wp-content/themes/themedir/style.css:WordPress主要的CSS文件。

wp-content/themes/themedir/images目录

一些WordPress主题在它们的主题文件夹的子目录下还存放了图像。如,默认主题使用的图像就存放在了 wp-content/themes/default/images/下。

返回顶部