My code is working fine on my localhost in my development environment which is outside of the WordPress press environment. I know the PHP function is working. I am able to send test votes to my server from my localhost on my PC.
Problem: I cannot get this to work in WordPress.
My Thoughts
I think it’s a path issue, but I’ve tried putting the PHP script in the root and using a full path.
I am not getting any errors in the web browser console (f12).
WordPress Version: 5.4.1
I put my custom php code into “/wp-contents/custom-php/votifier.php”
My JQuery script is in the header. (yes, I know I should put it in the footer.)
The Button
Localhost Version
WordPress Version
My Custom PHP Script
Network Info
- Hiện tại chúng tôi có hơn 25 nghìn bài văn mẫu các thể loại.
- Kho tài liệu, đề thi học sinh giỏi các lớp vô cùng phong phú.
- Mỗi ngày cập nhật hơn 100 đề thi chất lượng từ các website bán tài liệu lớn.
Tải đề thi VIP với giá siêu rẻ tại Vip.Dethihsg247.Com