-1

I'm trying to render HTML with wp_send_json, but it doesn't work, HTML is not formatting :

It's look like "<i class="fas fa-arrow-up"></i> 1 200" Any idea how can I solve this issue ?

1
  • Um, wp_send_json() is for sending JSON, hence the name, not HTML. Why are you trying to use it to render HTML? Sep 23, 2018 at 12:34

1 Answer 1

1

Instad of using wp_send_json(), just echo the HTML and end with a die; or exit;. This should return plain HTML (content) to your script.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.