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
3
votes
1 answer

Angular Bootstrap-UI Carousel using Dynamic Content

I am trying to implement the Bootstrap UI Angular Carousel with WordPress WP-API. I am curious how to connect 'slides' with 'posts' The demo HTML is...
2
votes
1 answer

Using Contact Form 7 with React

I'm trying to build a wp theme in React.. Is there any way to use contact form 7 plugin in react using wordpress rest-api
Jvin Mahmoud
  • 23
  • 1
  • 3
2
votes
0 answers

Wp api node got `/wp/v2/posts` was not found error

I got this error The requested URL /wp/v2/posts was not found on this server. when trying to post a new post using WP api in node.js. var WPAPI = require('wpapi') var wp = new WPAPI({ endpoint: 'http://example.com', username: 'test', …
Hoknimo
  • 533
  • 2
  • 6
  • 15
2
votes
3 answers

Why is my jq failing on my JSON?

Haven't used jq before but I'm wanting to build a shell script that will get a JSON response and extract just the values. To learn I thought I would try on my blog's WP API but for some reason I'm getting an error of: jq: error (at :322): Cannot…
DᴀʀᴛʜVᴀᴅᴇʀ
  • 7,681
  • 17
  • 73
  • 127
2
votes
1 answer

How do I pass url and email address as parameters Wordpress API?

Passing url as parameter results in error as below: {"code":"rest_no_route","message":"No route was found matching the URL and request method","data":{"status":404}} How is this done in WP API? register_rest_route( 'myap/v1',…
Mazolo
  • 307
  • 4
  • 19
2
votes
1 answer

Nuxt Generate Dynamic Routes Path

I'm creating a site with wp-api. All my pages are inside: - pages -- _slug If my page slug are site.com/about - pages -- about Nuxt will generate html like this. But... If my path are site.com/company/about Can I create this routes? PS: I'm…
Daniel Oshiro
  • 21
  • 1
  • 1
  • 3
2
votes
1 answer

WP REST API | RESTful URL parameters

I am creating a custom route using WP API this way: register_rest_route( 'service/v1', 'shopping', array( 'methods' => WP_REST_Server::READABLE, 'callback' => 'my_awesome_function', )); I am writing the following…
2
votes
1 answer

Wordpress : Using WP REST api v2 save post data for contact-form-7

I have installed "contact-form-7" plugin and using "Contact Form Submissions" to save data in the database (https://wordpress.org/plugins/contact-form-submissions). Also, I have created a form with same fields in a mobile app. I am using "WordPress…
Maulik patel
  • 1,551
  • 8
  • 22
  • 44
2
votes
0 answers

support for featured images for custom post types wp-api

How do I add support for featured images ins case of custom post types in wp-api? I found the following snippet which is enabling this kind of support for wordpress normal post but nothing about custom post types function init() { …
fefe
  • 8,755
  • 27
  • 104
  • 180
2
votes
0 answers

unabe to post using wordpress api

Please do not mark it as duplicate. Solution on those post doesn't seem to work. I want to post on my wordpress blog remotely using curl. I am using this curl command to post to wordpress curl -D- -X POST -H "Authorization: Basic…
GrSrv
  • 551
  • 1
  • 4
  • 22
2
votes
0 answers

Passing Meta Array in WP-REST API

I have been trying to pass a meta array to a post via front-end using WP-REST API but to no avail. functions.php: //Add custom field to REST API function filter_post_json( $data, $post, $context ) { $social_media = get_post_custom_values(…
input
  • 7,503
  • 25
  • 93
  • 150
2
votes
1 answer

WP REST API Extending existing controller

My ideia is to get the list of categories but with only the fields that I need. The request parameters (exclude, include, order, per_page, etc.) should work as when using REST API. So I am trying to extending the WP_REST_Terms_Controller.php…
amp
  • 11,754
  • 18
  • 77
  • 133
2
votes
0 answers

WordPress REST API Basic Authentication

I am working on a project that requires some integration between different WordPress instances and I am in the process of creating a WordPress plugin that will provide that functionality through the REST API. I have enabled the WP-API plugin and…
murtrex
  • 31
  • 6
2
votes
0 answers

How to use rest_url_prefix filter in wordpress

How can I modify the WordPress REST API endpoint for my custom API endpoints only? I'm using the WC API 2.6 also and I do not want to modify the endpoint for them. I just want to change the request endpoints for my custom API. My API is built on…
2
votes
1 answer

Rendering React Components Client-side via WordPress WP-API

I'm interested in experimenting with React and WordPress WP-API, I quickly put together a proof of concept page template below. Curious, what are the performance implications of rendering API data on the client with React versus allowing WP to…
Vinnie James
  • 5,763
  • 6
  • 43
  • 52