admin管理员组文章数量:1205734
I work on my on theme based on Neve theme. First I had problem with scripts, because not working but i had to change their location from footer.php to header.php to everything was good.
New some scripts not work because of the fact that css is not loading at all.
I tried 5 different approach but all fail.
- In header.php I just give them like
<style> </style>
- I used register style in functions.php, header.php and footer.php
function my_theme_enqueue_styles() {
wp_enqueue_style( $parent_style, get_template_directory_uri() . '/css/tooplate-infinite-loop.css' );
}
add_action( 'wp_enqueue_scripts', 'my_theme_enqueue_styles' );
- I try using them by put them on header.php
<link rel="stylesheet" href="<?php echo get_template_directory_uri(); ?>/css/tooplate-infinite-loop.css" />
4 and 5) are very similar I used costume style in element or, theme builder etc.
I work on my on theme based on Neve theme. First I had problem with scripts, because not working but i had to change their location from footer.php to header.php to everything was good.
New some scripts not work because of the fact that css is not loading at all.
I tried 5 different approach but all fail.
- In header.php I just give them like
<style> </style>
- I used register style in functions.php, header.php and footer.php
function my_theme_enqueue_styles() {
wp_enqueue_style( $parent_style, get_template_directory_uri() . '/css/tooplate-infinite-loop.css' );
}
add_action( 'wp_enqueue_scripts', 'my_theme_enqueue_styles' );
- I try using them by put them on header.php
<link rel="stylesheet" href="<?php echo get_template_directory_uri(); ?>/css/tooplate-infinite-loop.css" />
4 and 5) are very similar I used costume style in element or, theme builder etc.
Share Improve this question edited Feb 22, 2022 at 20:35 kamil danilski asked Feb 22, 2022 at 17:35 kamil danilskikamil danilski 314 bronze badges1 Answer
Reset to default 0This sounds strange if you have tried all these methods correctly and properly. I think you have to check these points:
- Purge cache in the whole website if you use a plugin for that
- Check your css file name if is written correctly, and is the correct path
To solve this problem definitely and quickly, i recommend you to use a child theme generator plugin, to achieve this task. One of the best option is a plugin called Child Theme Configurator which you can find at Child Theme Configurator
Hope this help you.
本文标签: plugin developmentWhy my theme39s css not working on another site
版权声明:本文标题:plugin development - Why my theme's css not working on another site 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1738709141a2108090.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论