N
N
Nikolay Erofeev2016-02-07 21:43:56
WordPress
Nikolay Erofeev, 2016-02-07 21:43:56

Does it return json from wp_query?

When making an ajax request, is it possible to get json from the server? The request is processed through the standard wordpress wp_query class.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
W
WP Panda, 2016-02-08
@Mackaybravo

As you call the yacht, so it will float.

<?php
$array = new WP_Query(array(/*бла-бла-бла*/));
wp_send_json( $array  )

or WP REST API

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question