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

The style.css stylesheet doesn’t contain a valid theme header

programmeradmin0浏览0评论

when I try to upload a theme I have uploaded on a free host and it is the first time I upload a theme on a host, I got this error failed because The style.css stylesheet doesn’t contain a valid theme header.

then I put this on my styles.css , but still getting this error , although the theme works very well on the localhost. what should I do, please?

/*
    Theme Name: shah
    Author: shah
    Author URI: 
    Description: Wordpress Theme
    Version: 1.0
*/

when I try to upload a theme I have uploaded on a free host and it is the first time I upload a theme on a host, I got this error failed because The style.css stylesheet doesn’t contain a valid theme header.

then I put this on my styles.css , but still getting this error , although the theme works very well on the localhost. what should I do, please?

/*
    Theme Name: shah
    Author: shah
    Author URI: http://shah.gq
    Description: Wordpress Theme
    Version: 1.0
*/
Share Improve this question edited Jun 5, 2020 at 15:35 social asked Jun 5, 2020 at 14:49 socialsocial 713 silver badges9 bronze badges 6
  • 1 Themes require a style.css file with this header. Your question mentions a styles.css file, plural, which is incorrect. – Jacob Peattie Commented Jun 5, 2020 at 15:01
  • thanks for comment, I changed it, but still getting the same error – social Commented Jun 5, 2020 at 15:11
  • Try removing the white space from the beginning of each line. And make sure it’s at the very top. – Jacob Peattie Commented Jun 5, 2020 at 15:13
  • changed it , but still getting the same error – social Commented Jun 5, 2020 at 15:19
  • 1 Just try by coping all the theme header from here(developer.wordpress/themes/basics/main-stylesheet-style-css) and add the your needed things in header. Some of the hosts check for the params in that header like Theme URI, Author URI etc. May be blocking those things to you. – Baikare Sandeep Commented Jun 5, 2020 at 15:54
 |  Show 1 more comment

2 Answers 2

Reset to default 2

Remove the extra space from the header. Try like below:

/*
Theme Name: shah
Theme URI: 
Author: shah
Author URI: http://shah.gq
Description: Wordpress Theme
Version: 1.0
*/

use same name for theme and also for your folder

发布评论

评论列表(0)

  1. 暂无评论