وردپرس

get_theme_file_uri does not work for scripts…


Replies: 0

Im trying to turn a web template into a static WordPress theme and get_theme_file_uri resolves in the url/the files instead of wp-content/themes/thetheme/js/plugins/swiper.min.js

so instead of looking for the file here: http://learning-test.local/wp-content/themes/TERAFORMED/js/plugins/swiper.min.js

it looks for the file here: http://learning-test.local/js/plugins/swiper.min.js

However when i log it in the debug file i see it resolves to http://learning-test.local/wp-content/themes/TERAFORMED/js/plugins/swiper.min.js

it also doesn’t work on a hosting…

I am speechless this looks impossible to be happening according to chatgpt and claude(im new to wordpress development)

The url on which this is happening: zanixa.merchsolution.net

I tried everything I know, i double checked the urls I added debuging and im looking at the debug file and i can’t believe what im seeing, the error log logs the right url but the url is wrong in the browser…

PS: My only theory is that it should be something in the js file but i don’t see anything wrong there

here is my theme:
https://github.com/apexdigitalreaper/apex-digital-theme/tree/main/teraformed

این خبر را در ایران وب سازان مرجع وب و فناوری دنبال کنید

مشاهده پاسخ های این مطلب
———————————————
این مطلب از سایت انجمن وردپرس گردآوری شده است و کلیه حقوق مطلق به انجمن وردپرس می باشد در صورت مغایرت و یا بروز مشکل اطلاع دهید تا حذف گردد

منبع: انجمن وردپرس

دکمه بازگشت به بالا