Title: YT Sub Counter
Author: PinoyITSolution
Published: <strong>11 oktober 2018</strong>
Last modified: 27 augustus 2026

---

Plugins zoeken

![](https://ps.w.org/show-youtube-subscribers-count/assets/banner-772x250.png?rev
=3668063)

![](https://ps.w.org/show-youtube-subscribers-count/assets/icon-256x256.png?rev=
3668063)

# YT Sub Counter

 Door [PinoyITSolution](https://profiles.wordpress.org/myndsyn/)

[Download](https://downloads.wordpress.org/plugin/show-youtube-subscribers-count.3.4.0.zip)

 * [Details](https://nl.wordpress.org/plugins/show-youtube-subscribers-count/#description)
 * [Beoordelingen](https://nl.wordpress.org/plugins/show-youtube-subscribers-count/#reviews)
 *  [Installatie](https://nl.wordpress.org/plugins/show-youtube-subscribers-count/#installation)
 * [Ontwikkeling](https://nl.wordpress.org/plugins/show-youtube-subscribers-count/#developers)

 [Ondersteuning](https://wordpress.org/support/plugin/show-youtube-subscribers-count/)

## Beschrijving

YT Sub Counter displays a YouTube “Subscribe” button with your channel’s live subscriber
count, powered by the official YouTube subscribe button embed.

Add the button with the “YouTube Subscribe” block in the editor, or with the `[ytsub]`
shortcode. The block works in posts, pages and the Site Editor, so you can drop 
it into a header, footer or sidebar template, or sit it in a Row next to core’s 
Social Icons block as one more social button.

Site-wide defaults are configured under Settings > YT Sub Counter:

 * Channel ID
 * Layout (default or full)
 * Theme (default or dark)
 * Subscriber count visibility (shown or hidden)

Every option on the block starts at “Use site default” and can be overridden on 
an individual block, or per shortcode: `[ytsub theme="dark" count="hidden"]`.

The “Youtube Subscribers” widget is still included and existing widgets keep working,
but it is legacy. Block themes have no widget areas at all, so the block is the 
way to place the button there.

### External services

This plugin relies on Google’s YouTube subscribe button embed to render the live
subscriber count and “Subscribe” button. This is a third-party/external service 
provided by Google.

On front-end pages that display a subscribe button, the plugin enqueues Google’s`
platform.js` script from `https://apis.google.com/js/platform.js`. Pages with no
block, shortcode or widget on them do not load it. Once loaded, that script (running
in the visitor’s browser, not on your server) connects to YouTube/Google servers
to render the subscribe button and fetch the channel’s live subscriber count. As
with any embedded third-party script, this transmits the visitor’s IP address and
standard browser/request data (such as the user agent and referring page) to Google,
and may set Google cookies, in accordance with Google’s own policies.

No data is sent to Google from your server, and the plugin itself does not collect,
store or transmit any personal data.

This service is provided by Google LLC:
 * Terms of Service: https://policies.google.
com/terms * Privacy Policy: https://policies.google.com/privacy * YouTube Terms 
of Service: https://www.youtube.com/t/terms

The script is required for the subscribe button to work, so there is no setting 
to disable it. Removing the block, shortcode and widget, or deactivating the plugin,
stops it from loading.

## Schermafbeeldingen

[⌊The subscribe button with its live subscriber count on the front end.⌉⌊The subscribe
button with its live subscriber count on the front end.⌉[

The subscribe button with its live subscriber count on the front end.

[⌊Site-wide defaults under Settings > YT Sub Counter, with a preview of the button.⌉⌊
Site-wide defaults under Settings > YT Sub Counter, with a preview of the button
.⌉[

Site-wide defaults under Settings > YT Sub Counter, with a preview of the button.

[⌊The "YouTube Subscribe" block in the editor, previewing the button, with every
option set to "Use site default".⌉⌊The "YouTube Subscribe" block in the editor, 
previewing the button, with every option set to "Use site default".⌉[

The “YouTube Subscribe” block in the editor, previewing the button, with every option
set to “Use site default”.

[⌊The block in a Row alongside the Social Icons block, as one more social button.⌉⌊
The block in a Row alongside the Social Icons block, as one more social button.⌉[

The block in a Row alongside the Social Icons block, as one more social button.

## Blokken

Deze plugin heeft 1 blok.

 *   YouTube Subscribe Your YouTube subscribe button with its live subscriber count.

## Installatie

 1. Upload the plugin files to the `/wp-content/plugins/show-youtube-subscribers-count`
    directory, or install the plugin through the WordPress plugins screen directly.
 2. Activate the plugin through the ‘Plugins’ screen in WordPress.
 3. Go to Settings > YT Sub Counter and enter your YouTube Channel ID. You can find
    your Channel ID at https://www.youtube.com/account_advanced
 4. Edit any post, page or template and add the “YouTube Subscribe” block, or use the`[
    ytsub]` shortcode.

## FAQ

### Nothing is displayed

Check that a Channel ID is set under Settings > YT Sub Counter, or directly on the
block, shortcode or widget. The button is not rendered when no channel is configured.

### The button shows an error

Make sure you’ve entered a valid YouTube Channel ID, not a custom URL or a handle
beginning with @. Your Channel ID is the string starting with “UC” shown at https://
www.youtube.com/account_advanced

### I can’t find Appearance > Widgets

Block themes, including the recent default WordPress themes, do not have widget 
areas, so the Widgets screen does not exist for them. Use the “YouTube Subscribe”
block instead. In the Site Editor you can add it to any template, including headers
and footers, which is where a sidebar widget would once have gone.

### How do I show it next to my other social icons?

Add a Row block, put core’s Social Icons block in it, then add the “YouTube Subscribe”
block beside them. The Row’s alignment controls will line them up. The subscribe
button is rendered by YouTube, so it keeps YouTube’s own styling rather than inheriting
your social icon colours.

### Is the widget going away?

Existing widgets keep working and there is no plan to remove the widget. It is no
longer the recommended way to add the button, because WordPress itself has moved
on from widget areas.

### Can I show more than one channel?

Yes. Set the channel on the shortcode itself, for example `[ytsub channel="UCxxxxxxxxxxxxxxxxxxxxxx"]`.
Any shortcode attribute overrides the site-wide setting.

### What shortcode attributes are available?

channel, `layout` (default or full), `theme` (default or dark) and `count` (default
or hidden). Anything you omit falls back to the setting saved under Settings > YT
Sub Counter.

## Beoordelingen

Er zijn geen beoordelingen voor deze plugin.

## Bijdragers & ontwikkelaars

“YT Sub Counter” is open source software. De volgende personen hebben bijgedragen
aan deze plugin.

Bijdragers

 *   [ PinoyITSolution ](https://profiles.wordpress.org/myndsyn/)

[Vertaal “YT Sub Counter” in je eigen taal.](https://translate.wordpress.org/projects/wp-plugins/show-youtube-subscribers-count)

### Interesse in ontwikkeling?

[Bekijk de code](https://plugins.trac.wordpress.org/browser/show-youtube-subscribers-count/),
haal de [SVN repository](https://plugins.svn.wordpress.org/show-youtube-subscribers-count/)
op, of abonneer je op het [ontwikkellog](https://plugins.trac.wordpress.org/log/show-youtube-subscribers-count/)
via [RSS](https://plugins.trac.wordpress.org/log/show-youtube-subscribers-count/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

#### 3.4.0

 * Improve: the settings screen is laid out in cards, with the channel and appearance
   options separated and instructions for the block, shortcode and widget alongside
   them.
 * New: a preview of the subscribe button on the settings screen that updates as
   you change layout, theme and count.
 * New: the block shows that same preview on the canvas, instead of a grey placeholder
   box, so it looks like what visitors will see.
 * New: the block uses the YouTube mark as its icon in the inserter and list view.
 * New: copy button for the [ytsub] shortcode, and help tabs on the settings screen.
 * Improve: a warning on the settings screen, and in the block, when no channel 
   ID is set and nothing will be displayed.
 * Assets: plugin icon and header image for the plugin directory.

#### 3.3.0

 * New: settings screen under Settings > YT Sub Counter for site-wide defaults.
 * New: “YouTube Subscribe” block, for posts, pages and the Site Editor. This replaces
   the widget on block themes, which have no widget areas, and can sit in a Row 
   alongside the Social Icons block.
 * New: [ytsub] shortcode, for templates and other places blocks are not available.
 * New: Settings link on the plugins screen.
 * Improve: widget options left empty now fall back to the site-wide settings.
 * Fix: option values (default, full, dark, hidden) were passed through translation
   functions, which could break the button on non-English sites.
 * Harden: channel IDs and select values are validated against an allow list on 
   save and on output.
 * Privacy: Google’s platform.js is now loaded only on pages that actually display
   a subscribe button, instead of on every front-end page.
 * Remove: an empty stylesheet and a placeholder script that were enqueued on every
   front-end page.
 * Docs: describe when platform.js is loaded, and correct the screenshot list.
 * Update: requires WordPress 6.3, for the block’s apiVersion 3 and iframe editor
   compatibility.
 * Update: tested up to WordPress 7.1.

#### 3.1.1

 * Fix: “Tested up to” now correctly lists only the major WordPress version.
 * Docs: disclose the external YouTube/Google platform.js service in this readme.
 * I18n: text domain corrected to match the plugin slug (show-youtube-subscribers-
   count).
 * Security: escape the filtered widget title with esc_html() before output.
 * Fix: renamed the generic “google” script handle to the prefixed “ytsub-youtube-
   platform”.

#### 3.1.0

 * Security: escape widget output (channel, layout, theme, count) with esc_attr()
   to prevent stored XSS via widget settings.
 * Fix: enqueue js/main.js as a script instead of a stylesheet.
 * Fix: correct asset URL resolution so css/js load from the plugin root.
 * Update: tested up to WordPress 7.0.2.

#### 2.0.0

 * Add theme options dark and default.
 * Correct error when using a non custom YouTube URL.

#### 1.0.0

 * Initial release.

## Meta

 *  Versie **3.4.0**
 *  Laatst geüpdatet **3 maanden geleden**
 *  Actieve installaties **10+**
 *  WordPress versie ** 6.3 of nieuwer **
 *  Getest t/m **7.1.4**
 *  PHP versie ** 7.4 of nieuwer **
 *  Taal
 * [English (US)](https://wordpress.org/plugins/show-youtube-subscribers-count/)
 * Tags
 * [block](https://nl.wordpress.org/plugins/tags/block/)[social](https://nl.wordpress.org/plugins/tags/social/)
   [Subscribe Button](https://nl.wordpress.org/plugins/tags/subscribe-button/)[subscriber count](https://nl.wordpress.org/plugins/tags/subscriber-count/)
   [youtube](https://nl.wordpress.org/plugins/tags/youtube/)
 *  [Geavanceerde weergave](https://nl.wordpress.org/plugins/show-youtube-subscribers-count/advanced/)

## Waarderingen

Er zijn nog geen beoordelingen ingediend.

[Je beoordeling](https://wordpress.org/support/plugin/show-youtube-subscribers-count/reviews/#new-post)

[Bekijk alle beoordelingen](https://wordpress.org/support/plugin/show-youtube-subscribers-count/reviews/)

## Bijdragers

 *   [ PinoyITSolution ](https://profiles.wordpress.org/myndsyn/)

## Ondersteuning

Iets te melden? Hulp nodig?

 [Het supportforum bekijken](https://wordpress.org/support/plugin/show-youtube-subscribers-count/)