Hide custom posts from certain taxonomy in rest api
Hide custom posts from certain taxonomy in rest api
Hide custom posts from certain taxonomy in rest api
There’s only 2 real places a locale is defined in a vanilla WordPress install: For the site. For the user account. In the admin the user account’s locale will be used, while on the front end the site’s locale will be used. For REST API requests the user locale can be used by passing _locale=user … Read more
Assuming a private plugin, not available via the repository, there are several search results for ‘wordpress private update’ that might be helpful. In fact, I recall doing it once several (many) years ago, but can’t find how I did it. (And I seem to recall posting the answer here on SO, but can’t find that … Read more
Can’t retrieve user email address with REST API
It appears that the issue lies with the in_array function that is checking if the current post type matches the post types specified in the template header information. The problem seems to be that the REST API is validating the parameters, including the template parameter, before passing it to the WordPress API to update the … Read more
wordpress rest api authentication failed
If you want to use application passwords to authenticate requests to your RESTful endpoints, you can modify your permission_callback function to check for the presence and validity of an application password instead of a user’s credentials. To do this, you can use the wp_check_application_passwords function, which was introduced in WordPress 5.6. This function takes an … Read more
You may need to flush the REST API cache in order to see the added field. You can do this by adding the following code to your plugin: This code will flush the REST API cache whenever a post (including a page) is saved or updated, so that the changes to the registered field will … Read more
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
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