Category: API

How to Get Featured Image from WordPress REST API


Luckily, there are few ways that you can get the featured image after calling the REST API. Method 1: Use Better REST API featured images plugin. I don’t recommend using this plugin unless you are super lazy. Method 2: Add ?_embed at the end of the URL. Take a look at the example below https://example.com/wp-json/wp/v2/posts?_embed Your featured image is … Continue reading How to Get Featured Image from WordPress REST API

How to get author meta into post endpoint in api v2 in WordPress


I added a code block that has some example stuff for context on registering custom routes. Hope it helps! Luckily, there are few ways that you can get author meta after calling the REST API. function wp_get_author_meta($object, $field_name, $request) { $user_data = get_userdata($object['author']); // get user data from author ID. $array_data = (array)($user_data->data); // object … Continue reading How to get author meta into post endpoint in api v2 in WordPress

How to create a Google Charts from PHP with MySQL Database

How to create a Google Charts from PHP with MySQL Database


If you need to display some sort of statistics on your website, it would be beautiful if you represent it with charts. It may be difficult to create those charts on your own. But, Google provides visualization api that makes it easy to create google charts from MySQL database using php. Basic Setup to Generate … Continue reading How to create a Google Charts from PHP with MySQL Database

Login With Google Plus Using PHP

Login With Google Plus Using PHP


How To Make Login With Google Plus Using Google Plus API and PHP cURL we will make login with google plus easily. Create A Project Go to Google Developer Console and create a project: Now open your project, and in left menu, choose "API Manager": Now click on "Google+ API": Now on "Enable API" button: Now in left menu, … Continue reading Login With Google Plus Using PHP

How To Send Email Via Gmail API Using PHP

How To Send Email Via Gmail API Using PHP


Using PHP cURL and Gmail API, we will send email easily, I made “Gmail API Script” using PHP, to send messages via Gmail API easily, we will use it in this tutorial. Create A Project Firstly, go to this tutorial and read “Create A Project” section, now create your project and enable gmail api, after that … Continue reading How To Send Email Via Gmail API Using PHP