Linux 软件免费装
Banner图

YT Sub Counter

开发者 myndsyn
ronknight
更新时间 2026年8月27日 12:53
PHP版本: 7.4 及以上
WordPress版本: 7.1
版权: GPLv2 or later
版权网址: 版权信息

标签

social block youtube subscriber count subscribe button

下载

1.0 2.0 3.0 3.1.0 3.1.1 3.3.0 3.4.0

详情介绍:

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: 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.

安装:

  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.

屏幕截图:

  • 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 block in a Row alongside the Social Icons block, as one more social button.

升级注意事项:

3.3.0 Adds a settings screen, a "YouTube Subscribe" block and a [ytsub] shortcode, so the button works on block themes, which have no widget areas. Existing widgets keep working. 3.1.0 Fixes a stored XSS vulnerability in the widget's front-end output. Upgrade is strongly recommended.

常见问题:

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.

更新日志:

3.4.0 3.3.0 3.1.1 3.1.0 2.0.0 1.0.0