Z Theme Switcher

外掛說明

When we are developing themes, we quite often like to switch between the old (active) and the new (to develop) version of a theme. Sometimes without other people noticing.
This plugin does exactly that.

What does it do?

It lets users with certain roles see another (than the currently active) theme, by
* Selecting a theme from the list of installed themes
* Selecting which user roles are permitted to switch themes and
* Optionally, selecting user roles that can use a ‘switch theme/back’ button on the front-end

This plugin is under active development. Any feature requests are welcome at plugins@zodan.nl!

安裝方式

Install the Theme Switcher from within WordPress

  1. Visit the plugins page within your dashboard and select ‘Add New’;
  2. Search for ‘Z Theme Switcher’;
  3. Activate the plugin from your Plugins page;
  4. Go to ‘after activation’ below.

Install manually

  1. Unzip the Theme Switcher zip file
  2. Upload the unzipped folder to the /wp-content/plugins/ directory;
  3. Activate the plugin through the ‘Plugins’ menu in WordPress;
  4. Go to ‘after activation’ below.

After activation

  1. On the Plugins page in WordPress you will see a ‘settings’ link below the plugin name;
  2. On the Theme Switcher settings page:
    ** Select the theme you want to be able to switch to
    ** Select the roles with the permission to switch
  3. Save your settings and you’re done!

常見問題集

Does it work in a multisite environment?

Yep. It does.

The Switch theme button on the front-end is not showing, can you help?

Hm. It could be that you are using a theme that does not call wp_footer() (which is the hook it is linked to).
In that case, you can use the custom hook/action for this.
Just add the following php code (make sure it is somehow called on every page):

Do you have plans to improve the plugin?

We currently have on our roadmap:
* Adding translations
* Adding a custom capability (to be used next to roles, for those who want to add a custom role)
* Set the preference per user

If you have a feature suggestion, send us an email at plugins@zodan.nl.

使用者評論

2025 年 6 月 30 日
Z Theme Switcher has quickly become one of my favourite tools when working on new WordPress themes. It solves a very specific problem in a clean and effective way: being able to preview a different theme — just for yourself or selected user roles — without changing the live site for visitors. What I really like: It’s lightweight and easy to set up You can control exactly who sees the development theme The optional front-end switch button is handy during testing It keeps everything safe and invisible to regular users I often need to develop or fine-tune a new design while a site stays online. With this plugin, I can work directly on the live server, test things in context, or share previews with clients — all without setting up a separate staging environment. It’s clear the developer understands real-world needs. The plugin is actively maintained and feels reliable. If you work with custom themes, this is definitely worth adding to your toolkit.
閱讀全部 1 則使用者評論

參與者及開發者

以下人員參與了開源軟體〈Z Theme Switcher〉的開發相關工作。

參與者

〈Z Theme Switcher〉外掛目前已有 1 個本地化語言版本。 感謝全部譯者為這個外掛做出的貢獻。

將〈Z Theme Switcher〉外掛本地化為台灣繁體中文版

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄

變更記錄

1.3

  • Added setting to also switch in the backend

1.2

  • Added JS to copy PHP code

1.1

  • Changed front-end JS and CSS loading method

1.0

  • Very first version of this plugin