| 开发者 | yorksupport |
|---|---|
| 更新时间 | 2026年7月13日 20:36 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.0 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
switch_themes capability.pagethsw_supported_post_types — Limit or extend supported post types.pagethsw_is_supported_post_early — Control post type support before init.No. It only changes the theme used for the selected content item. The active theme under Appearance → Themes is not modified.
Public post types with an admin UI are supported by default, including posts, pages, and custom post types. Attachments, revisions, templates, and other internal post types are excluded.
Preview mode is for logged-in users with permission to edit the item. To apply a theme for everyone, choose a theme in Content Theme, save the item, and open the public URL without preview query arguments.
Yes. Open Settings → York IE - Theme Switcher and check only the post types you want. Developers can use the pagethsw_supported_post_types filter.
On Settings → York IE - Theme Switcher, choose a default content theme for each enabled post type. Items without an individually selected theme automatically use that default on the front end. Per-item selections in the Content Theme panel always take precedence.
After you assign a theme, the Page template dropdown lists the page templates declared by that theme for the current post type. Selecting one renders the content with that template on the front end (and in preview). The list updates automatically when you change the theme.
The dropdown reads the page templates a theme registers through the standard WordPress template headers. Themes that do not ship custom page templates for the current post type will only show Default template.
init.pts_ filter hooks; use pagethsw_ filters only.pagethsw_ per WordPress.org guidelines.pts_ data automatically on upgrade.init.