【问题标题】:WordPress Renaming Themes FolderWordPress重命名主题文件夹
【发布时间】:2012-11-07 07:41:16
【问题描述】:

我想知道如何重命名 wp-content 中的“主题”文件夹。我已经重命名了我的 wp-content 文件夹和实际的活动主题文件夹名称,但是我在重命名了存储主题的文件夹之后。

/wp-content/themes/主题名

中间那个哈哈。

有谁知道这将如何实现?

【问题讨论】:

  • 用例是什么意思?我找不到你 AntonNiklasson。
  • 为什么要重命名主题文件夹?

标签: wordpress themes directory rename


【解决方案1】:

following 将使站点根目录中的目录“t”用作额外主题目录

register_theme_directory( '/www/htdocs/username/public_html/t' );

我想你会喜欢这个帖子:Steps to Take to Hide the Fact a Site is Using WordPress?

【讨论】:

    【解决方案2】:

    如果您想将插件和上传保存在 ex.用于 CDN 目的 (NFS) 的单独服务器并删除 public/www 权限。在这种情况下,您只部署主题而不是插件、上传等。

    define('WP_CONTENT_DIR', __DIR__ . '/data/wp-content');
    define('WP_CONTENT_URL', 'http://{your-url/to-blog}/wp-content');
    define('WP_PLUGIN_DIR', __DIR__ . '/data/wp-content/plugins');
    define('WP_PLUGIN_URL', 'http://{your-url/to-blog}/wp-content/plugins');
    
    $wp_theme_directories = array(__DIR__ . '{/directory-to-themes}');
    define('WP_DEFAULT_THEME', '{your-default-theme}');
    

    记住: 1. wp-config中的行顺序很重要 2. 将主题文件夹保存在 wp-content 中(即使它是空的)

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-02-29
      • 2020-04-29
      • 1970-01-01
      • 1970-01-01
      • 2013-10-02
      • 2014-09-09
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多