我如何更改WordPress中的主题名称?
我还可以更改文件夹名称themy1244 ind thone thone thee them thee them thee them thee them thee them them them them
public/wp-content/themes/theme1244
wp-content/themes/
文件夹。然后将您的主题文件夹重命名为您想要的任何内容。步长2:打开主题文件夹并打开
style.css
文件。在style.css的顶部,您会看到主题名称。重命名并保存更改。
步骤3:转到
Wp-admin/appearance/themes
并以新名称激活您的主题。
如果您使用的是孩子/父主题,并且还重命名了父主题文件夹和名称,那么步骤3之后,您应该在儿童主题
style.css
.中更改父主题路径(模板字段)。
注:重命名主题将停止其自动更新,您应该在将来手动进行。
上面的所有内容都是正确的,但还不够。重命名主题后,例如将文件夹重命名为old-theme
- >
new-theme
找到表中名为
theme_mods_old-theme
的选项wp_options
option_value
(这是以特殊WordPress格式保存主题自定义的文本)
将复制值输入在
theme_mods_new-theme
wp_options
的新选项中。
/* this should be at the top of your theme CSS file
Theme Name: Twenty Fifteen Child
Theme URI: http://example.com/twenty-fifteen-child/
Description: Twenty Fifteen Child Theme
Author: John Doe
Author URI: http://example.com
Template: twentyfifteen
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: light, dark, two-columns, right-sidebar, responsive-layout, accessibility-ready
Text Domain: twentyfifteenchild
*/
请查看更多详细信息