admin管理员组文章数量:1389924
i created a custom Theme in WordPress and everything is working fine and the CSS is loading to my index.php. So now i copy-pasted the index.php and renamed it, then i went to the indexCopy site and the CSS wont load. In the Code, everything is the sam, except the fileName. When i go back to my index.php, the css IS working. Do you need Code examples for this issue?
What am i doing wrong ?
i created a custom Theme in WordPress and everything is working fine and the CSS is loading to my index.php. So now i copy-pasted the index.php and renamed it, then i went to the indexCopy site and the CSS wont load. In the Code, everything is the sam, except the fileName. When i go back to my index.php, the css IS working. Do you need Code examples for this issue?
What am i doing wrong ?
Share Improve this question asked Mar 25, 2020 at 9:37 yama_HDyama_HD 1112 bronze badges 2- Is this a WordPress site? I don’t understand what “went to the indexCopy site” means? How are you doing that? – Jacob Peattie Commented Mar 25, 2020 at 9:43
- I am pressing a button on my "Main WordPress Page" then i got redirected to my copied index.php file and then, the css wont work. – yama_HD Commented Mar 25, 2020 at 9:54
1 Answer
Reset to default 0Sounds like your are not creating a proper WordPress template when you copy your index.php.
Here you can find the list of standard template files: https://codex.wordpress/Theme_Development#id=%22Template_Files_List%22
And here you can learn how to create a custom template: https://codex.wordpress/Theme_Development#Custom_Page_Templates
My guess is you need to add the following to the top of your index copy. Then make sure to select this template from the edit post/page view to use it on the front end (it should use the css).
<?php
/*
Template Name: Index Copy
*/
本文标签: customizationCustom CSS File wont work on second Page
版权声明:本文标题:customization - Custom CSS File wont work on second Page 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744638590a2616976.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论