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
0answers
6 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
343 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
16 views

Wordpress json rest api - question about formatting and post_meta [closed]

Can someone help me with the following: We are trying to use the wordpress json rest api - and while we are able to filter and retrieve the json posts the way we want to - the post_meta data that we ...
0
votes
0answers
22 views

Show WP content on different PHP Sites

we are about to start developing a big dynamic web project (Probably on ZF2) which will have some modules&tabs to act as CMS module (displaying news, galleries, posts etc). Let's assume we have ...
1
vote
1answer
25 views

Wordpress JSON API remove posts from a specific category

I have installed Wordpress JSON APi plugin, the idea what I want to do is to retrieve all posts from a websites except a specific category for example with ID: 434. I need all posts except from this ...
4
votes
2answers
226 views

Passing a hardcoded page/post ID into `get_post`

I see people using this to pull in page content on their home pages, remove specific categories from archives etc.. e.g. $post = get_post( 5 ); Someone suggested this was bad practice. Why is it ...
2
votes
1answer
323 views

Custom Connect to Facebook, problem logging in/logging out

I am working on a custom function for login in my users via facebook. I started by reading this nice tutorial on how to login in via facebook: ...
1
vote
1answer
72 views

I am trying to use the Theme Customization API but I keep getting an error

This is the error: Call to a member function check_capabilities() on a non-object in /home/content/54/11786754/html/wp-includes/class-wp-customize-control.php on line 161 and this is my code in ...
0
votes
0answers
28 views

How to add events to a Google Calendar using an html form on Wordpress page

I have implemented a Calendar onto a Wordpress page which uses Google Calendar to display events via XML. I am looking to add, edit and delete events from my Wordpress page, I am aware of the API and ...
3
votes
0answers
51 views

Is it Possible to Extend WP Customize JS Methods?

I’m wondering if it’s possible to extend the methods of the anonymous api object in wp-admin/js/customize-control.js. I need to overwrite one of these methods with my own custom logic but I suspect ...
0
votes
0answers
22 views

Upload media to WordPress through a web service

I would like to create a plugin through which I could expose a web-service for the media in WordPress. This service would allow external applications to upload and delete medias. Of course, the user ...
0
votes
0answers
37 views

How to structure WordPress plugin to display data from API

I am creating a plugin that connects to a remote API that has car listings and displays the data that's returned in that call. The plugin essentially does not need to interact with the WordPress ...
2
votes
1answer
57 views

Send Data to Wordpress from kiosk

I need to get a data from kiosk (think specific ATM machine) to wordpress database. Kiosk service providers told me to give them Gateway URL and Request format to send data. Im stuck on this, I dont ...
0
votes
1answer
24 views

Extra fields on categories that is available via the WP-API?

I want my posts to belong to a taxonomy with a couple of extra fields such as category_icon, category_quick_facts etc. I want this taxonomy (with all of its fields) to be available via the WP-API. How ...
0
votes
0answers
14 views

How to set specific values for a taxonomy via IXR_Client?

I am trying to create posts using IXR_Client. I am already able to do that, but now I am facing a problem were I don't know how to create sub-categories for the posts I am creating. The way I am ...
-1
votes
1answer
49 views

Need All the posts with id, title and date [closed]

I need all the post ids with the corresponding title and post date. Currently getting only ids $posts_array = get_posts( 'posts_per_page=999999999999&fields=ids' ); need [{ "id" : 9, ...
5
votes
1answer
3k views

Create API for single sign-on with 3rd party site

My site needs to integrate with a 3rd party software, which will live on its own sub-domain, hosted by the software company. I need to provide the 3rd party developers with an endpoint that they can ...
1
vote
0answers
14 views

Replacing the content of an image attachment using API

I have an existing image attachment, with a given ID. Is there a way, using API (specifically, Python Wordpress XML-RPC), to upload another image instead of the existing one, without creating a new ...
4
votes
2answers
883 views

Trying to get custom post meta through Jetpack JSON API [closed]

I'm using the Jetpack for Wordpress to produce a JSON API for my Events custom post type, which works fine: https://public-api.wordpress.com/rest/v1/sites/MYSITE/posts/?type=events&number=100 ...
0
votes
1answer
53 views

Using actions, hooks and filters in a non-WordPress page

I have a php script that sits outside of wordpress, but loads WP core with wp-load.php. Here is my basic page: <?php define('WP_USE_THEMES', false); global $wp, $wp_query, $wp_the_query, ...
4
votes
2answers
2k views

What WordPress API function lists active/inactive plugins?

After seeing thousands of useful API functions in the WordPress core, I'm surprised to discover today that there ain't a function that would list the active plug-ins. I don't know you but I'm quite ...
0
votes
2answers
74 views

How can I call specific function if requested URL is not found?

My website is fully API based and builds pages/posts from API data. I was thinking to create something like PHP magic function __call to call specific function when requested URL would return 404, but ...
2
votes
0answers
312 views

How to get featured post title & image using JSON API?

Is there any possibility to get featured post title and image using the JSON API. I tried using this: example.com/?json=the_post_thumbnails&count=3 But instead of recent posts, I get featured ...
0
votes
0answers
309 views

Plugin that uses AngularJS tutorial

I plan to make a plugin which should act as Backend for angularjs. And I search for a good tutorial for the implementation steps, but till now I did not found any good. Making some researches I found ...
2
votes
3answers
841 views

get post type plural

Currently I'm trying to get the post type labels plural. In detail: $GLOBALS['wp_post_types'][ get_current_screen()->post_type ]->labels->name This is how I'm trying to retrieve it - in ...
7
votes
1answer
599 views

How to use “Add link” pop up for a WordPress widget

In the WYSIWYG editor of WordPress you get pop up if you want to add a link for a text. Is there a possibility to access this functionality? Because I want to use this pop up for a WordPress widget ...
10
votes
3answers
4k views

Access WordPress API Outside of WordPress (command-line PHP)

I have a PHP script that I need to run as a cron job. However this script needs access to the WP API (get_pages(), get_post_meta() and get_permalink() specifically). I've followed the instructions ...
0
votes
0answers
22 views

Should I use transients for these API call results?

I am consuming an API that gives me a list of people and their profiles. My initial idea was working perfectly fine when it's just the list of people because I was just saving the ids and names using ...
0
votes
0answers
207 views

Fetching instagram api not working on wordpress

<?php $json = file_get_contents('https://api.instagram.com/v1/users/userid/media/recent/?access_token=accesstoken'); $a_json = json_decode($json, true); foreach( $a_json['data'] as $key => ...
0
votes
0answers
63 views

What is the proper url for facebook api to work with wordpress?

This may seem silly but after google searching it I was unable to find a solution. I'm using the newest facebook PHP SDK and wordpress. I've tested my code in plain php and it works like a charm. ...
0
votes
0answers
26 views

Developing a plugin, ran it through P3 Profiler, shows up slow, but I don't know why

I am having an issue with my plugin I'm developing. After using the GoDaddy P3 Plugin profiler, it shows that is taking up a large amount of runtime, but the plugin itself is very minimal. It just ...
0
votes
1answer
1k views

Consuming an external API to publish/post to wordpress

Is there a solution or a way to consume an external web service API (could be JSON or SOAP) to be able populate/update a wordpress blog ? For example using wikipedia api to pull content that ...
2
votes
4answers
411 views

WP.org API: Accessing plugin downloads “Today” value?

I'm developing a plugin to display stats for downloads and various other information that developers might want to display on their sites about what they have developed. I've found documentation on ...
0
votes
0answers
49 views

Manage a resource via REST API

I'm writing a plugin to manage the display of some resources accessed via a REST API. I've set up some rewrite rules to get the correct parameters to send via the API, and some shortcodes that ...
0
votes
1answer
305 views

wp_signon returns user but the user is not logged in because wp installed on subdomain. How to make it work?

I am using the WordPress API to get the user login. My code: <?php define('WP_USE_THEMES', false); require('wp-blog-header.php'); $creds = array(); $creds['user_login'] = 'user'; ...
0
votes
0answers
77 views

How to schedule future and past posts with metaWeblog.newPost

I am attempting to remotely post articles to a wordpress page and no matter what I attempt to do I cannot publish in the future and the past. I have commented out some past attempts (some found on ...
0
votes
0answers
120 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 ...
5
votes
3answers
2k views

WP function/filter for modifying http headers?

Is there a dedicated WP function, action or filter to use when adding/modifying the HTTP headers? For now I just hook a PHP header() call into the WP 'init' hook like this: add_action('init', ...
17
votes
8answers
13k views

How do you create a “virtual” page in WordPress

I'm trying to create a custom API endpoint in WordPress, and I need to redirect requests to a virtual page in the root of WordPress to an actual page that ships with my plug-in. So basically, all ...
2
votes
1answer
153 views

Connect external web app to wordpress

We have a web app that will allow users to edit their videos; and add intros, outros, and watermarks. Once the user already done on their video. We need to provide an option to post or syndicate ...
2
votes
3answers
1k views

An Unexpected HTTP Error occurred during the API request

I just did a clean install of Wordpress. But I have a problem when I install or use the WordPress API. So send me a sign An Unexpected HTTP Error occurred during the API request. The strange ...
0
votes
0answers
64 views

How would I remove an inline googleAPI font script in the the parent theme header.php?

Is there any way to remove the function call to the googlefontapi font in the parent header.php file besides copying the parent header.php file to the child theme and then overriding it and delete the ...
0
votes
0answers
62 views

Get full page HTML for a non-public Wordpress page

How can I write a function that will return the full rendered HTML of a non-public URL on my Wordpress site—a URL that you must be logged in to see, such as a draft? Not just the post content, but the ...
1
vote
4answers
9k views

How can you check if you are in a particular page in the WP Admin section? For example how can I check if I am in the Users > Your Profile page?

I'm building a plugin and I want to add bits of javascript in the admin head but only for certain admin pages. I don't mean pages as in a WordPress page that you create yourself but rather existing ...
0
votes
1answer
120 views

How to use HubSpot Forms API in Wordpress pages?

How to use HubSpot Forms API in Wordpress pages? I have to pass dynamic values to the Hubspot Form. Thanks in advance
0
votes
0answers
114 views

Call wp_create_user function from external?

I want to create New Users from external. I've found this is function in wordpress: wp_create_user( $username, $password, $email ); So how can i run this function from external call please? I ...
1
vote
0answers
27 views

Wordpress does not show products when the value of post_parent is not 0

I use wp-e-commerce. I created a custom post type called "event". I would like to create new "event" as a parent and hook products under it. When I "hook" a product under post parent "event", ...
3
votes
2answers
222 views

Use an attachment in multiple posts

I have an attachment in a post and I want to attach it to another post without detaching it from the first post, using the WP API.
0
votes
0answers
119 views

Vimeo Froogaloop API, working in Fiddle but not WP

I'm trying to harness Vimeo's Froogaloop API to pause video embeds whenever a user clicks a certain element. I have it working perfectly in my Fiddle but it wont work in my Wordpress environment. I ...
0
votes
0answers
88 views

get_avatar() returns false, use with JSON-API

I have JSON-API installed and I'm using a custom controller to get all users with the role 'editor'. I also have WP-User-Avatar installed so the editors can upload their own images instead of using ...