Get Comment Text via REST API

A brief introduction and what does wp.apiRequest() return wp.apiRequest() is one of the three JavaScript API written by WordPress (the other two JavaScript APIs are the Backbone JavaScript Client and wp.apiFetch()), which we can use to communicate with the WordPress REST API, and as for wp.apiRequest(), it uses jQuery.ajax() which returns a jqXHR object that … Read more

Using the REST API filter, including two meta_queries breaks the response for one custom post type

Oddly, the cause of the problem seems to be the quotation marks around the comparison parameter. For example filter[meta_query][0][compare]=%27=%27 now needs to be filter[meta_query][0][compare]==. When only matching one meta value, this is not necessary, when matching two, this is, now, necessary. :/ Update: I realised that my hosting provider changed the version of Linux on … Read more

upload image with rest API to the media library

Does functions.php continuously execute while WordPress is running? Yes, it’s run on each page load. You can learn more about the (theme) functions file at https://developer.wordpress.org/themes/basics/theme-functions/. Should this be in functions.php file and how do i get it to execute only once? It can be put in that file, however, it should be run conditionally, … Read more