English 中文(简体)
语言压力:独立的专题需要指数。 php file ERROR
原标题:WordPress Theme: Standalone theme need index.php file ERROR

I suddenly got got an error when coding - wordpress -> theme: enter image description here

我不理解为什么情况如此,因为我有一个指数.php页。 这里也有风格。 风格也有以下评论:

风格

Theme Name: samirTheme
Author: samir
Author URI: www.wordpress.com
Version: 1.0
Description: This is a cool theme
Template: Test1

这里是组合结构。

“entergraph

字句。 因此混淆了为什么这个主题被打破,而不是用文字表示。 任何想法?

最佳回答

SOLUTION The solution way actually very simple. I found that it was really hard to find a good resource for the answer so I am answering here.

缺乏风格:模板:评论标题中的主题,即:

/*
 Theme Name:   samirTheme
 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:  twenty-fifteen-child
*/
问题回答

为了让语言基金会认识到一套主题模板文件是一个有效的主题,风格文件必须放在你的主题目录上,而不是一个子标题。

因此,如果你想要在/css/cs/cs/cs上填写,那么主要主题就归根到底。

例头:

/*
Theme Name: Twenty Seventeen
Theme URI: https://wordpress.org/themes/twentyseventeen/
Author: the WordPress team
Author URI: https://wordpress.org/
Description: Twenty Seventeen brings your site to life with immersive featured images and subtle animations. With a focus on business sites, it features multiple sections on the front page as well as widgets, navigation and social menus, a logo, and more. Personalize its asymmetrical grid with a custom color scheme and showcase your multimedia content with post formats. Our default theme for 2017 works great in many languages, for any abilities, and on any device.
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: twentyseventeen
Tags: one-column, two-columns, right-sidebar, flexible-header, accessibility-ready, custom-colors, custom-header, custom-menu, custom-logo, editor-style, featured-images, footer-widgets, post-formats, rtl-language-support, sticky-post, theme-options, threaded-comments, translation-ready
This theme, like WordPress, is licensed under the GPL.
Use it to make something cool, have fun, and share what you ve learned with others.
*/

For more info read this: https://developer.wordpress.org/themes/basics/main-stylesheet-style-css/

我曾见过Same。 我有所有必要的档案(因为两个档案只需要索引和风格),如果你有一页的风格,我已经注意到。 c 向你提供上述错误信息。

因此,我交叉核对,甚至将索引文件从主编中删除。

如果我删除指数.php,则从主链中存档,将其放在纸浆中。

我不知道为什么发生这种情况。 但是,我似乎需要在风格或风格上填写索引。 c 档案存放在主要文件夹中。

这一错误也可以由特性编码造成。 例如:

$ file -I style.css
style.css: text/plain; charset=us-ascii
$ file -I style-error.css
style-error.css: text/plain; charset=utf-16le

从网页(,例如, 辅导文章)上下载和贴出中央安全局的代码,是一个共同的原因。 如果《特别安全法》包含特殊性质,有时档案编辑将试图改变特别安全局档案的编码,以适应所增加的所有特性。

在问这个问题之后很久,希望能帮助寻求答案的人。

I ran into the same issue after I renamed my custom theme. So what happened is that Wp has kept the old theme folder which is EMPTY. So all I had to do is to delete that old folder and everything is golden. I hope this help you too. Good luck!





相关问题
Brute-force/DoS prevention in PHP [closed]

I am trying to write a script to prevent brute-force login attempts in a website I m building. The logic goes something like this: User sends login information. Check if username and password is ...

please can anyone check this while loop and if condition

<?php $con=mysql_connect("localhost","mts","mts"); if(!con) { die( unable to connect . mysql_error()); } mysql_select_db("mts",$con); /* date_default_timezone_set ("Asia/Calcutta"); $date = ...

定值美元

如何确认来自正确来源的数字。

Generating a drop down list of timezones with PHP

Most sites need some way to show the dates on the site in the users preferred timezone. Below are two lists that I found and then one method using the built in PHP DateTime class in PHP 5. I need ...

Text as watermarking in PHP

I want to create text as a watermark for an image. the water mark should have the following properties front: Impact color: white opacity: 31% Font style: regular, bold Bevel and Emboss size: 30 ...

How does php cast boolean variables?

How does php cast boolean variables? I was trying to save a boolean value to an array: $result["Users"]["is_login"] = true; but when I use debug the is_login value is blank. and when I do ...

热门标签