This tutorial provides the code which enables you to display YouTube views per video in WordPress or any Genesis child theme using custom fields like this :
To do this, you’ll need to use Google Developers API Manager for Credentials.
The API supports several types of API keys. If the key type that you need does not already exist, create an API key by clicking Add credentials > API key and selecting the appropriate key type which is browser keys.
Create and use a browser key if your application runs on a client, such as a web browser.
In this case, we’ll create a browser key.
- Add Credentials
- Create a New Project
- Create Credentials
Copy your API key and swap out the xxxxxxxxxxxx with your API key in the code below :