Before theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Jhon-mantila/pluging-wordpress/llms.txt
Use this file to discover all available pages before exploring further.
[youtube_largo] and [youtube_shorts] shortcodes can fetch videos, the plugin needs a YouTube Data API v3 key and your channel’s ID. This guide walks you through creating the key in Google Cloud Console, finding your Channel ID on YouTube, and saving both values in the WordPress admin panel.
What you need
- A Google account
- YouTube Data API v3 enabled on a Google Cloud project
- An API key generated for that project
- Your YouTube Channel ID (starts with
UC)
Steps
Open Google Cloud Console
Go to https://console.cloud.google.com/ and sign in with your Google account.
Create or select a project
Click the project dropdown at the top of the page. Either select an existing project or click New Project, give it a name (e.g.
my-wordpress-site), and click Create.Enable YouTube Data API v3
In the left-hand menu navigate to APIs & Services → Library. Search for
YouTube Data API v3, click the result, then click Enable.Create an API key
Navigate to APIs & Services → Credentials and click Create Credentials → API Key. Google will generate the key and display it in a dialog. Copy it before closing.
(Recommended) Restrict the API key
In the Credentials list, click the pencil icon next to your new key. Under API restrictions, choose Restrict key and select YouTube Data API v3. Under Application restrictions, add your site’s domain. Click Save.
Find your YouTube Channel ID
Go to your YouTube channel page. Click your profile photo in the top-right corner → Settings → Advanced settings. Your Channel ID is displayed there — it begins with
UC and is around 24 characters long. Copy it.API quota information
YouTube Data API v3 grants 10,000 units of quota per project per day by default. The plugin is designed to use as few units as possible:| Operation | Units per call |
|---|---|
playlistItems.list (one page, up to 50 IDs) | 1 unit |
videos.list (durations for up to 50 videos) | 1 unit |
search.list (not used by this plugin) | 100 units |
UC… → UU…), so it never calls channels.list. Each page of the playlist costs 1 unit to list and 1 unit to resolve durations — 2 units per 50 videos. Results are cached for 12 hours using WordPress transients, so the vast majority of page views consume zero quota.
If you expect high traffic or are embedding many shortcodes on the same page, you can request a quota increase in Google Cloud Console under APIs & Services → Quotas.
Alternative: define the key in wp-config.php
If you prefer not to store the API key in the WordPress database, you can define it as a PHP constant. When no value is saved in the admin settings, the plugin checks this constant before falling back to the shortcode api_key attribute.
wp-config.php
- Admin DB option —
esquina_youtube_settings[api_key](set via EsquinaWeb → YouTube) wp-config.phpconstant —ESQUINA_YT_API_KEY- Shortcode attribute —
api_key="…"(least secure — avoid in production)
YouTube Long Videos Shortcode
Reference for the
[youtube_largo] shortcode parameters and examples.YouTube Shorts Shortcode
Reference for the
[youtube_shorts] shortcode parameters and examples.Security Best Practices
How to store your API key safely and avoid exposing it in page source.
Performance Tips
Caching behaviour and tuning recommendations for the YouTube feed.