Virtual Theme

Virtual Theme allows you to switch themes based on virtual paths, making an entire site accessible through multiple themes based on their URL prefix.

Author:Max Jonathan Spaulding - Mobile Sentience LLC (profile at
WordPress version required:2.2
WordPress version tested:3.1.4
Plugin version:1.0.14
Added to WordPress repository:20-03-2011
Last updated:08-05-2011
Warning! This plugin has not 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.
Rating, %:0
Rated by:0
Plugin URI:
Total downloads:4 915
Active installs:100+
plugin download
Click to start download

Virtual Theme allows you to switch themes based on virtual paths. This makes makes an entire WordPress site accessible through multiple themes based on their URL prefix. This enables you to present you site with multiple themes based on how the site is accessed without the need for separate hostnames or ssl certificates. (i.e. and A specific theme template can be assigned to a specific virtual path. For instance, Mobile Sentience is using this plugin switch to a theme that is formated to work with Facebook's new iframe landing pages when accessed via Permalinks must be enabled though no additonal changes need to be made to your web server, .htaccess file or domain name server. You can also add custom variables with unique values for each virtual path. You can access the custom variables in your themes, they are saved as an array in the get vaariable name 'VirtualThemeVariables'. $_GET["VirtualThemeVariables"]['testvar'];

Virtual Theme works together with Advertwhirl to it simple to allow a customer to make their own "virtual brand" of your WordPress site.

Known Issues:

  • Fixed rewrite rules to be more specific so permalinks that contain part of a virtual path don't match
  • Virtual paths must be chosen to not collide with existing permalinks (this is different then above. Above is a fix where the permalink is not equal to the vpath but contains the vpath. The two still can not be 100% equivalent)
  • if you are upgrading from version 1.0.10 or older you may have to deactivate the plugin and then reactivate it to get rewrites to work, also please check to see that your vpaths were properly imported. Both have been tested and should work, but in a few cases this failed in testing. Workarounds have been tested and should be working. If anyone experiences a problem with this please report it.
  • There have been issues reported for WordPress sites setup for multisite networks. Version 1.0.12 is most of the way to fixing this, waiting on feedback to see if an extra rewrite rule or two need to be added.