An application programming interface (API) specifies how some software components should interact with each other. In addition to accessing databases or computer hardware, such as hard disk drives or video cards, an API can be used to ease the work of programming graphical user interface components. ...

learn more… | top users | synonyms

0
votes
1answer
23 views

WP Rest API - How to get featured image

I'm very new to this API, in fact I've only spent couple hours on it so far. I've done my research but cannot find anything about it... The issue is, I can't seem to get the featured image of a post. ...
0
votes
1answer
471 views

Authenticating a user with the WP-API V2 in Postman

I'm using Postman to test my project and the wp-api. More specifically POST requests where a user must be authenticated to do something. Here's what I'm working with to create a user: {{url}}/...
0
votes
1answer
27 views

How to avoid loading wp-load.php from external php scripts?

i use slim with wordpress. This worked flawlessly so far. Well almost. Once I changed to multisite I had to start fake creating $_SERVER variables faking a domain name. But it worked finally. What I ...
2
votes
1answer
26 views

Get all tags not just first 10 with wp api 2.0

if I do /wp-json/wp/v2/tags I only can get first 10, and seems the adding per_page=0 no longer work on it for getting actually all tags. Anyone knows how to actually get all the tags with wp-api 2.0?
3
votes
1answer
784 views

How to use REST API over CURL with authentication?

I am trying to use the WordPress Rest Api with authentication to get more data from the API. I have installed the Oauth plugin, rest-api plugin, and gotten API credentials from WP-CLI. I have ...
0
votes
2answers
2k views

wp_insert_post not working for custom post type?

For whatever reason wp_insert_post doesn't work for a custom post type. Here's the code snippet I'm using. $new_post = array( 'post_type' => 'rsp_synonym', 'post_title' => ...
0
votes
0answers
21 views

Wordpress Authentication without Wordpress functionality

The requirement is to authenticate against the WordPress users tables to get past the paywall but not offer any WordPress functionality. The problem to resolve is that since the user is ...
0
votes
1answer
55 views

Customizer, change preview url when a control changes

I've a dropdown control that lists all pages of the website. When I select a page in the dropdown I would update the preview iframe to that page. There is the following method to change the ...
-1
votes
1answer
227 views

Create new product with woocommerce REST API with javascript (clientside)?

Is it possible to create new products in woocommerce using its API with javascript from clientside? I tried this for getting all products: endpoint: https://localhost/wpShop/wc-api/v2/products?...
0
votes
2answers
94 views

WordPress API - count posts

Is there a way to count the number of posts / pages via the WordPress API? I'm wanting to insert a post then check, using the API, that the count has gone up by 1. I've looked at http://codex....
2
votes
1answer
42 views

Extending Wordpress REST API

I'm trying to create an API where external clients can authenticate users and reset their password through a REST API. I've already seen this: External WordPress API. However, it looks like this is ...
1
vote
1answer
37 views

Change Page's <title> Tag Using functions.php File

In my child theme's functions.php file, I'm trying to change a page's title tag: function custom_title() { return "Page Title"; } add_filter( 'wp_head', 'custom_title', 9999 ); The code above ...
-1
votes
2answers
548 views

Wordpress SMS API integration without plugin

I am struggling with SMS sending in WordPress without plugin, I have a, API, but that API is not working. Example: function mysite_woocommerce_order_status_processing( $order_id ) { $mobile="...
3
votes
1answer
2k views

API integration with WordPress

I'm trying to integrate a 3rd party API with WordPress. I fear this is above my head. I was this code but I'm not exactly sure how to make is work in WordPress. Is it possible? $ch = curl_init(); ...
0
votes
0answers
30 views

wp_remote_request to execute “DELETE” method in Zoho subscription

Hi I need to execute this in wordpress website DELETE https://subscriptions.zoho.com/api/v1/customers/{customer_id} but I can't find WP_remote api function that would directly trigger DELETE. I find ...
0
votes
1answer
27 views

How do I query my Wordpress posts on another HTML page using the Wordpress Restful API?

I have a fully functional Wordpress site and I want the to create a new separate website that displays the posts from the wordpress site using the Wordpress Rest API. I understand that typing http://...
0
votes
1answer
30 views

Getting a Page via its post-name using WP REST API v2 and Postman

Using Postman as a Chrome extension I have had success accessing Pages(not posts as I don't use them) from my WP website. Having trouble pulling data using the post-name url that I set way back in ...
0
votes
0answers
29 views

Fetch api json data pagination

I'm developing a plugin that needs to fetch all font families list from Adobe Typekit API. I'm using wp_remote_get to accomplish this. $font_list = array(); $fonts_lib = wp_remote_get( 'https://...
0
votes
0answers
652 views

Is there any way to Integrate WordPress with Imgur for Image Hosting

I wanted to use Imgur for hosting all my WordPress website images. Till now I know how to integrate Imgur with a simple form using an upload script. The process is well explained at Subin's Now what I ...
0
votes
1answer
9 views

REST or Alternative Method for New User && New Site && Assign User to New Site as Admin?

Looking for a method to add a new user to a site, assign them to that site as an admin. API does not seem to support this. Any functions I should be looking at as alternatives?
0
votes
0answers
29 views

REST API And Error Codes - No Message

I'm writing some code which inserts a new post and some postmeta using AngularJs and the REST API. I'm filtering the rest_pre_insert{postype} hook which is allowing me to throw an error when the ...
0
votes
0answers
19 views

Options of accessing wordpress data from mobile app

There is an existing wordpress website and I would like to make native app(probably will do crossplatform native with React Native as I have experience with it) for it. So my question is: is there an ...
1
vote
0answers
22 views

Authenticate with a Rails app?

There seems to be lots of posts where another app / website uses a WP website to authenticate against. I am looking for the opposite. I have a Rails app that uses Devise for authentication. I have a ...
0
votes
0answers
209 views

Custom route for WP-API gives “rest_no_route” value

I am following this tutorial to create custom end points to WP-API . I am always getting this error on hitting /wp-json/custom-plugin/v2/get-all-post-ids/ on postman to test : { "...
0
votes
1answer
64 views

Develope REST API using Wordpress for Android app [closed]

I am an Android developer and new to WordPress. Requirement : is to write rest APIs to Login and get User details after login. All the plugins and wp-rest apis only expose core functionalities and ...
0
votes
0answers
34 views

Upload media Remote or Api

I couldn't find any accurate answers, therefore asking here. I have a website that runs multiple cron jobs in WordPress and generates posts from multiple resources with images and descriptions. I am ...
0
votes
0answers
33 views

Flexslider+Vimeo APi in WP

I created a custom post type using flexslider. It supports video (vimeo/youtube) and images. It works but I need to add the vimeo api (froogaloop) because I need: The video to automatically stop ...
0
votes
0answers
47 views

Customizer API - trigger refresh manually

Is there a way to trigger refresh of live preview manually from js file? I have tried wp.customize.instance('some_setting_id').previewer.refresh() http://shibashake.com/wordpress-theme/wordpress-...
0
votes
0answers
24 views

How to integrate Netller payment gatway on wordpress?

I am trying to integrate Netller payment gatway but it's throwing an error on execution. Can anybody help me to resolve this issue. What I have tried so far is: $username = 'myusername'; $password = ...
0
votes
0answers
26 views

How can i create a signup form in my mobile app with WP REST API v2?

I'm builgind a native mobile app and i want users to sign up to my WordPress site using WP REST API. How can i implement this function securely into my app? I found a create user endpoint in the ...
0
votes
1answer
567 views

Best way to hook a custom url?

Let say I've a custom page with slug created "/products", I want user will be able to POST to a form with url "/products/create" and allow us to render some JSON output. The "/products/create" page ...
0
votes
1answer
65 views

body_class REST field in WP-API

I'm building a site with WP-API (v2). I'm attempting to add a REST field according to documentation that includes anything from body_class. However, body_class is returning either one class (one ...
0
votes
0answers
159 views

Authentication for a mobile app connected via wp-rest api?

Building a cordova (HTML/JS) based mobile app (not-native) and I want to use wordpress only as the backend. The idea is that mobile app users will be making requests to the API and custom endpoints ...
0
votes
1answer
84 views

Why aren't tags and categories added in post request to WP Rest API

I'm using V2.0 and trying to create a post using the /posts endpoint. Here's the payload being sent with my request: var payload = { title : "some title", format : "link", tags: ["...
0
votes
0answers
93 views

How can I display products from an external API on my Woocommerce (WordPress plugin) based site?

I have a created a new eCommerce store using WooCommerce WordPress plugin. Now, I want to display products from an external site using their API. I've got access and required authentication to their ...
-1
votes
1answer
98 views

Zoho subscription API to Wordpress [closed]

Please help me to integrate ZOHO subscription api to Wordpress without using any plugins. Project process would be: 1. Wordpress: The user can choose product and it's add on in the form options. I ...
1
vote
1answer
796 views

API for creating blogs on Multisite?

Is there some API or plugin that allows for creation of sites on a multisite install? Jetpack doesn't seem to allow it, and the xml rpc doesn't seem to support multisite. Is there something I can use ...
0
votes
0answers
45 views

Refresh the Customizers preview after editing fields

I'm using ACF fields on a few custom widgets. While using the Customizer to edit fields, they will save on change but the preview will not refresh. Calling wp.customize.previewer.refresh() will ...
0
votes
0answers
19 views

Choosing what Shortcodes should render

So I am working on a mobile app that pulls from a WordPress JSON API, I've coded our own end point and it's delivering content just fine. I need a way to be able to pick and choose what shortcodes ...
21
votes
4answers
17k views

Programmatically add a Navigation menu and menu items

Through API functions, I want to define a new Navigation menu, select it in the current theme, and then insert a few Pages as menu items. This is to be done for instance on a theme activation. ...
0
votes
1answer
93 views

how to get nonce using json api

I try to open this url in my browser or calling from my frontend application: http://78.47.177.214/blog/api/get_nonce/?controller=posts&method=create_post i keep getting the response {"...
2
votes
1answer
293 views

How do I use the WP REST API plugin and the OAuth Server plugin to allow for registration and login?

Are there any example projects that do the same? I want to be able to login and register for accounts on my site via the API.
0
votes
1answer
294 views

Users credentials and syncing from third party with WooCommerce

I am trying to build a web store for a client who has already had a mobile app. the mobile app team would like to sync user's password as they update it both on the mobile app and the web store. ...
3
votes
1answer
307 views

Is it possible to enqueue the Youtube API script or does it have to be inline?

The code below is the main part of a function in my functions.php which returns a div and script which ultimately output a youtube API iframe to the template where the code had been called from. At ...
0
votes
1answer
13 views

Surrogate ID for posts, is there an alternative field in the posts table?

I am copying some content between another CMS and Wordpress. I need to keep track of the original Id because I might have to update the copied content in the future. The old CMS will still be used for ...
5
votes
1answer
258 views

how to authenticate for the REST API from a plugin and from command line

I want to try the new REST API but I'm not used to this kind of things. Basically, I want to use it to GET custom posts via ajax and show on the website frontend (I'm building an ajax product ...
0
votes
2answers
89 views

Where to put API Code?

I want to use some of the Wordpress API built in functions such as wp_remote_request(). I have tried using this in a php file in my root Wordpress installation but I am just getting an error: ...
1
vote
1answer
54 views

Using API to generate short link

I want to use a shortcode that generates a short URL from API of Premium URL Shortener script. I added code from API to my template functions: // Main Function function shorten_url($url){ $...
0
votes
0answers
131 views

Access Control Allow Origin problem with CORS

I'm at wit's end. We're using CORS to go back and forth between a .NET environment and a WP/BuddyPress environment. I've added the Access-Control rule to the header in index.php, with no wildcard. ...
0
votes
0answers
39 views

how to display term name angularjs

I've recently learned about angularjs and I am trying to display a term associated with a specific custom taxonomy. So far this is what I've tried in my partials file - <div ng-repeat="post in ...