Questions tagged [wp-api]

Provides an easy to use HTTP REST API to access your WordPress site’s data.

This project was born to create an easy-to-use, easy-to-understand and well-tested framework for creating these APIs, plus creating APIs for core.

This plugin provides an easy to use REST API, available via HTTP. Grab your site’s data in simple JSON format, including users, posts, taxonomies and more. Retrieving or updating data is as simple as sending a HTTP request.

Official website

235 questions
0
votes
0 answers

error_log doesn't work when using https

I have WordPress site which extends WP_API plugin to provide custom set of APIs. Everything works fine as intended, however, recently I implemented SSL to the site after which site has stopped recording logs. I have wrapper function which uses…
Ghazanfar Mir
  • 3,493
  • 2
  • 26
  • 42
0
votes
1 answer

how to get data from WP-API url

I'm using the plug-in wp-api, how can I get data such as the post titles from this url? http://scd.blaze.wpengine.com/wp-json/posts?type=listings&filter[listing_area]=northwest I am attempting to get it using Angular JS, I have this code so far - …
Lucy Brown
  • 264
  • 4
  • 17
0
votes
1 answer

How to use Angular JS with reults from WP-API

I have this URL working with my site using wp-api - http://scd.blaze.wpengine.com/wp-json/posts?type=listings&filter[listing_area]=midlands which outputs this code (using a chrome plugin to display it neatly) - I'm really new to this and would…
Lucy Brown
  • 264
  • 4
  • 17
0
votes
1 answer

Get a list of categories Wp API

Is there a way to get a list of categories (just the name and maybe date) from WP API? I don't want to see the posts within the category, just the categories.
Mark B
  • 167
  • 3
  • 13
0
votes
1 answer

JSON WP API Video Embed Ionic

I have an ionic app getting json data and I added Advanced Custom Fields so I can 'embed' a video (youtube, vimeo, etc.) in a post. The problem is it's only getting the html code (). How can I have it to where it's actually displaying the video?
Mark B
  • 167
  • 3
  • 13
0
votes
1 answer

ReactJS / WP Picard theme error

Hi I am currently learning and experimenting with the ReactJS / WP theme by Jack Lenox https://github.com/Automattic/Picard I when I have installed it is not displaying the posts & the Console is displaying this message Uncaught TypeError: Cannot…
roshambo
  • 2,624
  • 6
  • 31
  • 54
0
votes
1 answer

How do I view multiple posts on WP REST API?

I can do https://public-api.wordpress.com/rest/v1/sites/www.website.com/posts/ to view the latest 20 posts on a WP site. How do I view more than 20? Or view all the posts?
Muz
  • 5,866
  • 3
  • 47
  • 65
0
votes
2 answers

WP-API v2 and post_metas

Is there a way to get post metas via wp-api on request. I have a custom post_type having metas which I would like to receive on request but I do not see in docs any reference to this
fefe
  • 8,755
  • 27
  • 104
  • 180
0
votes
1 answer

WP-API GET multiple pages by id

I want to get page id 12 and 14 using WP-API. Normally, if I wanted only 1 page I would write '/wp-json/pages?filter[p]=14' or '/wp-json/pages?filter[page_id]=14' If I wanted pages by author id 1 and 2, I'd write…
dnl005
  • 11
  • 1
  • 4
0
votes
1 answer

External request to Wordpress WP-API - Basic Authentication

I'm trying to hit my Wordpress API using Basic Auth with Guzzle (http tool) from my middleware (Laravel). $username = 'myAdminUserName'; $password = 'myAdminPassword'; $uri = 'https://example.com/wp-json/mysite-api/cleared-action'; $response =…
Tuesdave
  • 669
  • 2
  • 8
  • 26
0
votes
1 answer

New thumbnail size url in WP returning "0" with Angular and WP-API

I'm working on a project using WP-API and Angular. I just added a new custom image size to the functions.php My /wp-json/posts (the JSON output) shows the url for the new image size and using the url…
Leopold Kristjansson
  • 2,246
  • 28
  • 47
0
votes
0 answers

HTTP 500 – Wordpress WP-API without any message?

I'm using themosis – a framework for wordpress that works pretty well. Also I use WP-API - that doesn't work so great. All versions are the latest stables and the Server is using PHP 5.5 On calling that API…
CodeBrauer
  • 2,690
  • 1
  • 26
  • 51
0
votes
1 answer

If image is null from JSON, use another image - AngularJS

Below I have an ng-repeat where the inner div gets a background image set after reading a JSON file. My question is - If post.featured_image.attachment_meta.sizes.medium.url does not exist or is null, what would be the best approach to replace this…
Cecil Theodore
  • 9,549
  • 10
  • 31
  • 37
0
votes
1 answer

Reconciling WP API, AngularJS, and $resource/$http requests (getting X-WP-TotalPages)

I'm putting together an app using WP-API with an Angular frontend. I'm developing locally, with the data I'm trying to use loaded in from a remote server. Doing a $resource request for all posts works great. But, I'm trying now to get the result of…
Dylan Gattey
  • 1,713
  • 13
  • 34
0
votes
0 answers

How to search for words in ACF usign WP-API

I'm currently making a website built with Wordpress using WP-API. The part I get stuck is that I cannot get posts searched by any words in Advanced Custom Fields by using filter[s] which is a parameter officially supported by WP-API.org…
Ryo Ikarashi
  • 341
  • 4
  • 11
1 2 3
15
16