| 开发者 | mauriya |
|---|---|
| 更新时间 | 2026年7月3日 00:03 |
| 捐献地址: | 去捐款 |
| PHP版本: | 8.0 及以上 |
| WordPress版本: | 7.0 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
[youtubesearch] shortcode with optional heading/placeholder attributes.ytps_render_search() template tag for theme developers./wp-json/ytps/v1/videos) for your own tooling or AI agents./wp-content/plugins/, or install it through the Plugins screen in your dashboard.@handle, a full channel URL, or a channel name — and choose whether your channel's videos should be shown first alongside public results, or exclusively.[youtubesearch] into any post, page, or text widget.<?php if ( function_exists( 'ytps_render_search' ) ) { ytps_render_search(); } ?> to a template.Yes. The search box displays normally; searches will show a short notice asking visitors to check back later until an API key is added.
No. It's stored in the WordPress options table and used only in server-side requests. It's never printed into page HTML or JavaScript — a meaningful difference from plugins that embed the key directly in the page source, where anyone can view-source and lift it.
If you list your channel(s) and leave "Only show videos from the channel(s)" unchecked, a search first checks each configured channel for matches, places those at the top of the results, then fills remaining slots with public search results for the same keyword. Checking that box hides public results entirely and searches your channel(s) only.
Yes, up to 5, one per line or comma-separated. Each can be a @handle, a full channel URL, or a channel ID.
The plugin renders your channel's latest videos as real, indexable HTML on page load (with genuine <a href> links to YouTube, not JavaScript-only content), and includes schema.org VideoObject structured data automatically. That's a meaningfully different starting point than a plugin whose entire result set only exists after a visitor manually searches. It's not a guarantee of rankings — no plugin can promise that — but it gives search engines real content to work with.
When you configure a channel, the plugin exposes /wp-json/ytps/v1/videos — a cached, schema.org-shaped JSON list of that channel's latest uploads. It's meant for your own use: custom integrations, other tools on your site, or AI agents/crawlers that prefer structured data over parsing rendered HTML.
Yes. Each instance (block, widget, shortcode) works independently — search state, results, and the video player don't interfere with each other even if several are on the same page.
YouTube removed public dislike counts from the Data API in December 2021. The like indicator reflects a like-to-view ratio instead.
The plugin ships its own self-contained styles (no Bootstrap, no external CDN) and uses standard WordPress hooks for blocks/widgets, so it should work with any properly-coded theme. If something looks off, it's almost always a CSS specificity conflict — the support forum is the place to flag it.
#query instead of .ytps-query), so it never matched and the input rendered unstyled — visible as an oversized, empty-looking search bar with a plain browser-default text box instead of the intended compact search field. Styling now applies correctly.heading attribute).youtube-post-search.php back to youtubepostsearch.php. The 3.2.0 rewrite renamed it, which broke the update path for sites with the plugin already installed and active — WordPress tracks active plugins by exact file path, and the old path no longer existed after updating, silently stopping the plugin from loading. Fresh installs of 3.2.0 were unaffected; in-place updates from an earlier version were not. If you experienced the search box not working after updating to 3.2.0, updating to 3.2.1 resolves it with no configuration changes needed.<a href> links with schema.org VideoObject JSON-LD, instead of starting as an empty box that only fills in after a visitor searches./wp-json/ytps/v1/videos for your channel's videos, with a <link rel="alternate"> discovery tag in the page head.uploadDate (from the API's publishedAt) to structured data output.