最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Is it possible to create child themes using the Wordpress Dashboard?

programmeradmin0浏览0评论

I've been looking into creating a child theme in which I can make changes to my theme, but all the tutorials I can find assume that you're working with a local Wordpress installation, and explain how to create the necessary folders and files in a file manager like Windows Explorer.

Is it possible to create a child theme from within the Wordpress dashboard itself?

I've been looking into creating a child theme in which I can make changes to my theme, but all the tutorials I can find assume that you're working with a local Wordpress installation, and explain how to create the necessary folders and files in a file manager like Windows Explorer.

Is it possible to create a child theme from within the Wordpress dashboard itself?

Share Improve this question asked May 7, 2019 at 22:29 Hashim AzizHashim Aziz 2977 silver badges19 bronze badges
Add a comment  | 

2 Answers 2

Reset to default 3

You will achieve this in two steps:

  • uploading minimal files at yourdomain/wp-admin/themes.php
  • editing child theme at yourdomain/wp-admin/theme-editor.php

The theme that you upload to your site via the admin console must contain three files. They will end up in your server's filesystem like this:

/wp-content/themes/parentname-child/functions.php
/wp-content/themes/parentname-child/screenshot.png
/wp-content/themes/parentname-child/style.css

When uploading, functions.php can be empty, but style.css must contain the required header comment at the very top of the file. While not strictly mandatory, screenshot.png improves the user experience by giving the theme a thumbnail in the console. Once the child theme validates, it will show up in in your WordPress Theme Editor (e.g. yourdomain/wp-admin/theme-editor.php) where you can edit within the web console.

You can create the necessary files and folders on your local machine, zip them up, and then upload them as a new theme from the "Add New Theme" screen: https://wordpress-install.test/wp-admin/theme-install.php

Click on the Upload Theme button next to the page title.

发布评论

评论列表(0)

  1. 暂无评论