This plugin hasn’t been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.

User Theme

Description

It’s a simple Plugin to load a Theme for a special user based on IP, User-ID, category or User-Level.
This plugin allows you to safely test an development drive a theme on your live-blog.

No longer maintained

This plugin is no longer maintained. It is actively tested up to version 3.4.2.

You can use a different Theme for different user. The pluginis very small and easy, no options in the database-table and no options in backend of WordPress. You must always change the source.

Hint: if you use a Theme-Framework, then is the hook template the name of the framework and the hook stylesheet the name of the activate child-theme. You must copy the function and add this with a different name. Follow a small example.

add_filter('template', 'fb_user_theme_template' );
add_filter( 'option_template', 'fb_user_theme_template' );
function fb_user_theme_template( $template = '' ) {

    if ( current_user_can('manage_options') ) {
        $template = 'genesis'; // framework
    } elseif ( current_user_can('read') ) {
        $template = 'twentyten';
    }

    return $template;
}


add_filter( 'stylesheet', 'fb_user_theme_stylesheet' );
add_filter( 'option_stylesheet', 'fb_user_theme_stylesheet' );
function fb_user_theme_stylesheet( $stylesheet = '' ) {

    if ( current_user_can('manage_options') ) {
        $stylesheet = 'enterprise'; // childtheme
    } elseif ( current_user_can('read') ) {
        $stylesheet = 'twentyten';
    }

    return $stylesheet;
}

Installation

  1. Unpack the download-package
  2. Edit the php-file with your ID, User-Level or IP and Theme-Name etc.

    • $template Variable for theme-name (db-name of theme)
    • if ( array( 1, 21 ) ) ID of user
  3. Upload the files to the /wp-content/plugins/ directory

  4. Activate the plugin through the ‘Plugins’ menu in WordPress
  5. Ready

Reviews

Breaks everything…

Gives me an error about the active theme being broken. Then switches to a “default” theme that doesn’t exist. Blanks out my entire website.

Read all 4 reviews

Contributors & Developers

“User Theme” is open source software. The following people have contributed to this plugin.

Contributors

Translate “User Theme” into your language.

Interested in development?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.

Changelog

0.4.1 (06/12/2013)

  • Remove BOM on file