A
A
AveConstantis2021-10-04 22:50:23
WordPress
AveConstantis, 2021-10-04 22:50:23

How to fix admin-ajax 400 error?

Hello, I'm trying to implement Ajax requests, namely, display posts by clicking on a button, everything would be fine, but for some unknown reason an error pops up: 400 (Bad request). The paths are correct. True, if you follow the links, then admin-ajax returns 0.

615b5a7174412379513141.png
615b5a7e05d6c559105799.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Aricus, 2021-10-05
@Aricus

400 - bad request. Probably wrong url. What's in the ajaxurl variable? If the path is relative, it must be relative to the page, not the script file.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question