admin管理员组文章数量:1327988
I use wp astra to customize our site and have set up a child theme but for some reason, the wp_enqueue_style is not working if the file is in a subfolder.
When I view source the page, it does output the URL like this <link rel='stylesheet' id='my-css-css' href='https://my-domain-url/wp-content/themes/astra-child/assets/css/style.css?ver=1.1' media='all' />
but when I click and visit the URL I get 404 page not found.
Here's the wp enqueue code.
wp_enqueue_style( 'my-css-css', get_stylesheet_directory_uri() . '/assets/css/style.css', array('astra-theme-css'), '1.1', 'all' );
This one works if I put the file inside the main folder of the child theme.
wp_enqueue_style( 'my-css-css', get_stylesheet_directory_uri() . '/style.css', array('astra-theme-css'), '1.1', 'all' );
Can anyone help and explain why it doesn't work?
Thank you in advance! Cheers!
本文标签: wp enqueue stylewpenqueuestyle not working if the file is in a sub folder
版权声明:本文标题:wp enqueue style - wp_enqueue_style not working if the file is in a sub folder 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742250766a2440715.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论