Hi There,
I’m trying to add comments to a feed using WP-API. So far, I have the following:
https://workoutanywhere.net/wp-json/wp/v2/posts?categories=1100
However, I really need the ability to comment on posts, and when posts are picked, this option is gone? Anyone know what I’m missing?
Thanks,
J
I have created some custom taxonomy and am utilizing WP’s REST API v2. I am able to call posts with a specific taxonomy id like so:
https://example.com/wp-json/wp/v2/posts?custom_taxonomy=14
This works great to retrieve all posts with this category. My question is how to EXCLUDE all posts with this category. I know the api supports the categories_exclude parameter, but how can I do the same for a custom taxonomy?
]]>Hey there,
I have installed the plugin “yet another Star rating” wich has no custom post type and only use querys to the database.
Is it possible to register the ratings of a post so that they will be shown at “wp-json/wp/v2/posts/[id]?_embed”.
Thank you for your reply!
Stefan
Using the WP API backbone client in admin and I keep running into an error that I can track down. On initial load of a post I run this simple code
export const posts = ( postID ) => {
const post = new wp.api.models.Post(
{
id: postID
}
);
return post.fetch().done(function (res) {
return res;
});
};
which seems to fetch the schema from /wp/v2/
I can hit that route just fine and get back the proper API response, but for some reason, the client where I am attempting to load my post obj, I get back a 403 with json response of {"code":"rest_cookie_invalid_nonce","message":"Cookie nonce is invalid","data":{"status":403}}
Any ideas on how to fix?
]]>I need to get Menu Items in Rest-Api,
I saw these 2 plugins:
WP API Menus
WP-REST-API V2 Menus
but I don’t know which on has most compatibility with latest version of API, or maybe there is better way!
I need your Ideas Please ??
]]>hi
can you provide me the information how can i change api response language.
i want to change api response in multiple language like (French,Italian and Russian)
plz reply ASAP.
Hi, im developing an app mobile for this web site, when i load my pages by id, it never load the children pages…
Please check my pages hierarchy in this link.
What i want is, by using the id of page Customs, the children and subchildren of custom warehouse be loaded.
Can someone help me how to do it
Hey there,
I have a multisite running 4.7.2.
When trying to access https://site.com/wp-json I get 404.
When trying to access https://site.com/wp-json/, I get Internal Server Error 500.
When I researched, I found that the 500 was essentially being caused due to way too many redirects, as presumably, either the redirect to wp-json/ wasn’t being found or redirect wasn’t working correctly.
[Sun Feb 12 19:45:46 2017] [error] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
[Sun Feb 12 19:45:46 2017] [debug] core.c(3093): [client 66.187.239.11] r->uri = /wp-json/
[Sun Feb 12 19:45:46 2017] [debug] core.c(3099): [client 66.187.239.11] redirected from r->uri = /wp-json/
[Sun Feb 12 19:45:46 2017] [debug] core.c(3099): [client 66.187.239.11] redirected from r->uri = /wp-json/
And my .htaccess:
RewriteEngine On
RewriteBase /
<IfModule mod_deflate.c>
<filesMatch "\.(js|css|html|php)$">
SetOutputFilter DEFLATE
</filesMatch>
</IfModule>
# Rewrite www.domain.com to domain.com
# RewriteCond %{HTTP_HOST} ^www\.(.*)
# RewriteRule ^(.*) https://%1/$1 [R,L]
RewriteCond %{HTTP_HOST} !^$
RewriteCond %{HTTP_HOST} ^www\.(.*) [NC]
RewriteRule ^(.*)$ https://%1/$1 [R=301,L]
#uploaded files
RewriteRule ^(.*/)?files/$ index.php [L]
RewriteRule ^(.*/)?files/(.*) wp-includes/ms-files.php?file=$2 [L]
# add a trailing slash to /wp-admin
RewriteCond %{REQUEST_URI} ^.*/wp-admin$
RewriteRule ^(.+)$ /$1/ [R=301,L]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule . - [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-.*) $2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
RewriteRule . index.php [L]
Any clue how to fix this?
]]>This plugin has worked for me without failure for over 4 months and now suddenly my post id routes are throwing 403s. The less generic routes all work but the actual route I need does not.
/wp-json/wp/v2/curiosities/662
<- fails
/wp-json/wp/v2/curiosities
<- doesn’t fail
I’m upgraded my wordpress to the latest to see if that resolves it but it did not, I am now using the inlined version with wordpress.
When I navigate directly to the route I now see this:
Page Could Not Be Loaded
We’re very sorry, but the page could not be loaded properly. This should be fixed very soon, and we apologize for any inconvenience.
]]>i have categories and under those categories i have some subcategories. using json rest api v2 i want to return categories and subcategories of that category seperately. how can i do that???
]]>Hi,
When trying to access website.com/wp-json/wp/v2/posts it returns http error 500.
Pretty permalinks is enabled, allow override all directives already configured too in apache.
I have no idea, previously it was working before then it just stop when I migrate to a new server.
Any specific requirements I need to set in order for api to work? Any help is appreciated thanks.
]]>Hi,
kindly help me, how to generate the json for complete all post. now its show some certain post in json.
Hello,
I am using wordpress 4.7.1 and i want to use wordpress rest api that came with latest version.
WP Rest API is working fine with GET request but not POST request. I am not able create any post with the POST request.
I am getting these response for every time i tried.
{
"code": "rest_cannot_create",
"message": "Sorry, you are not allowed to create posts as this user.",
"data": {
"status": 401
}
}
Please help to solve this asap
]]>I am trying to list my site users with https://blog-url/wp-json/wp/v2/users
but it is only returning users that are authors. It is not returning users with subscriber or contributor privileges.
How can i duplicate default wp rest api V2 endpoints? I would like to keep default endpoints and routs intact, but would like to use simplified responses for my application.
]]>Hello,
I am using WP API version 1 and I have a custom post status called “unreliable”. I am trying to filter the unreliable posts and I am using:
wp-json/posts?filter[status]=unreliable
But this is not working for some reason.
Please help.
Thanks in advance…
Sid
I am experiening a conflict with this plugin Weight Loss Tracker version 4.0.1
The result is: The chart on the Weight Loss Tracke shows both axis but no data, if I disable the Rest API plugin, everything works fine. The functionality from the REST API is required for the online ( frontend ) editor functionality
Is this a known issue plugins, any experience ?
Regards Ge Timmer
WP REST API plugin Causes conflict issues with jetpack plugin and it disables jetpack features with this error :
SyntaxError: Unexpected token < in JSON at position 0
I have been attempting to add a post feed to my external website, from posts from a wordpress managed site. Im not sure what I’m doing wrong
I have the newest version of WP REST API installed, but when I attempt to go to https://www.greenseadistribution.com/products/wp-json/v2/posts, i get a 404 error.
I don’t know if there is another plugin messing with this or not. I checked my server folder and at no point has there ever been a /wp-json directory ever created. Do i have to create that directory myself? what am I doing wrong, as there doesn’t seem to be other people with this same issue.
]]>1) I have installed a plugin for fancier author box plugin for author bio.
2) when I access the post via rest api, the plugin filter is displaying unwanted data.
3) how to stop certain filters to stop running rest requests.
Thanks,
sharma
hi,
is there a way to add a new keys to json object,
i have installed gtranslate plugin, and i want to translate
the data coming from the query to diffrent languages.
i have been told by the gtranslate support,
that i need to edit the json object by adding it a new keys
that will contain the values to be translated.
so i am trying to understand how can i do it.
thanks ??
How can I get site logo and custom customize field value using Wp Rest API?.Basically, I want to get customize field value in rest API response.
]]>Hello, I want to use api with Ultimate Membership Pro. how can i use it. it should work as it is as site. if we restrict to user for content, it should not send that content which is restricted.
Is it work? Please let me know asap.
What is the current roadmap to PHP 7 compatibility?
Specifically, a compatibility check revealed the following issues:
/wp-content/plugins/rest-api/lib/endpoints/class-wp-rest-revisions-controller.php
245 | ERROR | Extension ‘mysql_’ is deprecated since PHP 5.5 and deprecated since PHP 5.6 and removed since PHP 7.0 – use mysqli instead.
248 | ERROR | Extension ‘mysql_’ is deprecated since PHP 5.5 and deprecated since PHP 5.6 and removed since PHP 7.0 – use mysqli instead.
/wp-content/plugins/rest-api/lib/endpoints/class-wp-rest-comments-controller.php
560 | ERROR | Extension ‘mysql_’ is deprecated since PHP 5.5 and deprecated since PHP 5.6 and removed since PHP 7.0 – use mysqli instead.
561 | ERROR | Extension ‘mysql_’ is deprecated since PHP 5.5 and deprecated since PHP 5.6 and removed since PHP 7.0 – use mysqli instead.
/wp-content/plugins/rest-api/lib/endpoints/class-wp-rest-posts-controller.php
683 | ERROR | Extension ‘mysql_’ is deprecated since PHP 5.5 and deprecated since PHP 5.6 and removed since PHP 7.0 – use mysqli instead.
692 | ERROR | Extension ‘mysql_’ is deprecated since PHP 5.5 and deprecated since PHP 5.6 and removed since PHP 7.0 – use mysqli instead.
/wp-content/plugins/rest-api/extras.php
150 | ERROR | Extension ‘mysql_’ is deprecated since PHP 5.5 and deprecated since PHP 5.6 and removed since PHP 7.0 – use mysqli instead.
I used Magic Fields 2 to create my Custom Post Types. Is it possible to make a call to the data for them?
]]>Hi,
We are trying to get all category and sub-category through API
“domain-name/wp-json/wp/v2/categories” but we get only list categories not sub-categories.
So please suggest me any other API which return all categories and sub-categories or what we can do to get all categories and sub-categories.
We are using
WordPress 4.4
WP REST API Version 2.0-beta13.1
Regards
Gaurav
Hi I’m trying to use the WP-REST API plugin and have a client able to basic auth to access post revisions, but I’ve run into a few problems:
do_shortcode
)post_meta
I’ve added to my endpoints isn’t in the revisions endpoint and I really need access to it without having to publish the posts (currently /post/[post_id]/revisions
only returns author, date, guid, id, modified, parent, slug, title, content, excerpt, and _links)Basically I need this in order to hijack the preview button to have access to the data externally, which requires both the post
and the post_meta
info, but without publishing the changes necessarily.
Many thanks for any help in solving this!
]]>Hello,
https://www.mywebsite/wp-json/wp/v2/users lists only 3 out of 10 users provisioned in wordpress Can you please advise how to list them all?
This happens on two websites and not only one.
New users created in wp are never listed
Thank you
]]>Hi,
I’m looking to consume an external REST API and display the content on a WordPress page.
But I’m not having much luck.
Is there any help of documentation on this area?
I′ve been trying to post using postman. I have Wp Api v2 and Basic Auth. I always get 401:
{
“code”: “rest_cannot_create”,
“message”: “Sorry, you are not allowed to create new posts.”,
“data”: {
“status”: 401
}
}
I′m using my admin user for wordpress and it is well written.
Please someone help.
]]>